Skip to content

Commit

Permalink
Merge pull request #1140 from timvaillancourt/fix-issue-1117
Browse files Browse the repository at this point in the history
Fix `integer divide by zero` panic in migrator
  • Loading branch information
dm-2 authored Jul 6, 2022
2 parents 8d9761d + b7f7e2c commit 3901a86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion go/logic/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,8 @@ func (this *Migrator) printStatus(rule PrintStatusRule, writers ...io.Writer) {
w := io.MultiWriter(writers...)
fmt.Fprintln(w, status)

if elapsedSeconds%this.migrationContext.HooksStatusIntervalSec == 0 {
hooksStatusIntervalSec := this.migrationContext.HooksStatusIntervalSec
if hooksStatusIntervalSec > 0 && elapsedSeconds%hooksStatusIntervalSec == 0 {
this.hooksExecutor.onStatus(status)
}
}
Expand Down

0 comments on commit 3901a86

Please sign in to comment.