Skip to content

Commit 3901a86

Browse files
author
dm-2
authored
Merge pull request #1140 from timvaillancourt/fix-issue-1117
Fix `integer divide by zero` panic in migrator
2 parents 8d9761d + b7f7e2c commit 3901a86

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

go/logic/migrator.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,8 @@ func (this *Migrator) printStatus(rule PrintStatusRule, writers ...io.Writer) {
10091009
w := io.MultiWriter(writers...)
10101010
fmt.Fprintln(w, status)
10111011

1012-
if elapsedSeconds%this.migrationContext.HooksStatusIntervalSec == 0 {
1012+
hooksStatusIntervalSec := this.migrationContext.HooksStatusIntervalSec
1013+
if hooksStatusIntervalSec > 0 && elapsedSeconds%hooksStatusIntervalSec == 0 {
10131014
this.hooksExecutor.onStatus(status)
10141015
}
10151016
}

0 commit comments

Comments
 (0)