@@ -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 % 600 == 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 )
@@ -606,7 +619,7 @@ func (this *Migrator) printStatus() {
606
619
shouldPrintStatus = (elapsedSeconds % 5 == 0 )
607
620
} else if elapsedSeconds <= 180 {
608
621
shouldPrintStatus = (elapsedSeconds % 5 == 0 )
609
- } else if this .migrationContext .TimeSincePointOfInterest () <= 60 {
622
+ } else if this .migrationContext .TimeSincePointOfInterest (). Seconds () <= 60 {
610
623
shouldPrintStatus = (elapsedSeconds % 5 == 0 )
611
624
} else {
612
625
shouldPrintStatus = (elapsedSeconds % 30 == 0 )
0 commit comments