added onStatus hook
This commit is contained in:
parent
6acbe7e3ae
commit
972728cf40
@ -108,3 +108,7 @@ func (this *HooksExecutor) onSuccess() error {
|
||||
func (this *HooksExecutor) onFailure() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *HooksExecutor) onStatus(statusMessage string) error {
|
||||
return nil
|
||||
}
|
||||
|
@ -1065,6 +1065,10 @@ func (this *Migrator) printStatus(rule PrintStatusRule, writers ...io.Writer) {
|
||||
)
|
||||
w := io.MultiWriter(writers...)
|
||||
fmt.Fprintln(w, status)
|
||||
|
||||
if elapsedSeconds%60 == 0 {
|
||||
this.hooksExecutor.onStatus(status)
|
||||
}
|
||||
}
|
||||
|
||||
// initiateHeartbeatListener listens for heartbeat events. gh-ost implements its own
|
||||
|
Loading…
x
Reference in New Issue
Block a user