Merge pull request #1140 from timvaillancourt/fix-issue-1117
Fix `integer divide by zero` panic in migrator
This commit is contained in:
commit
3901a86422
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user