printing courtesy reminder once per 10 minutes

This commit is contained in:
Shlomi Noach 2016-05-31 21:12:39 +02:00
parent 9519a66825
commit 2df94f9c51

View File

@ -580,7 +580,7 @@ func (this *Migrator) printStatus() {
} }
// Before status, let's see if we should print a nice reminder for what exactly we're doing here. // Before status, let's see if we should print a nice reminder for what exactly we're doing here.
shouldPrintCourtesyReminder := (elapsedSeconds%120 == 0) shouldPrintCourtesyReminder := (elapsedSeconds%600 == 0)
if shouldPrintCourtesyReminder { if shouldPrintCourtesyReminder {
courtesyReminder := fmt.Sprintf("# Migrating %s.%s; Ghost table is %s.%s; migration started at %+v", courtesyReminder := fmt.Sprintf("# Migrating %s.%s; Ghost table is %s.%s; migration started at %+v",
sql.EscapeName(this.migrationContext.DatabaseName), sql.EscapeName(this.migrationContext.DatabaseName),