File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -578,8 +578,21 @@ func (this *Migrator) printStatus() {
578
578
if rowsEstimate > 0 {
579
579
progressPct = 100.0 * float64 (totalRowsCopied ) / float64 (rowsEstimate )
580
580
}
581
- var etaSeconds float64 = math .MaxFloat64
582
581
582
+ // Before status, let's see if we should print a nice reminder for what exactly we're doing here.
583
+ shouldPrintCourtesyReminder := (elapsedSeconds % 120 == 0 )
584
+ if shouldPrintCourtesyReminder {
585
+ courtesyReminder := fmt .Sprintf ("# Migrating %s.%s; Ghost table is %s.%s; migration started at %+v" ,
586
+ sql .EscapeName (this .migrationContext .DatabaseName ),
587
+ sql .EscapeName (this .migrationContext .OriginalTableName ),
588
+ sql .EscapeName (this .migrationContext .DatabaseName ),
589
+ sql .EscapeName (this .migrationContext .GetGhostTableName ()),
590
+ this .migrationContext .StartTime .Format (time .RubyDate ),
591
+ )
592
+ fmt .Println (courtesyReminder )
593
+ }
594
+
595
+ var etaSeconds float64 = math .MaxFloat64
583
596
eta := "N/A"
584
597
if isThrottled , throttleReason := this .migrationContext .IsThrottled (); isThrottled {
585
598
eta = fmt .Sprintf ("throttled, %s" , throttleReason )
You can’t perform that action at this time.
0 commit comments