From 6dfa4873c296a7b0472e5b64aafd7902e74a973f Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Mon, 29 Aug 2016 10:44:43 +0200 Subject: [PATCH] removed excessive argument --- go/logic/hooks.go | 9 +++------ go/logic/migrator.go | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/go/logic/hooks.go b/go/logic/hooks.go index 8906f62..ad55b99 100644 --- a/go/logic/hooks.go +++ b/go/logic/hooks.go @@ -138,12 +138,9 @@ func (this *HooksExecutor) onFailure() error { return this.executeHooks(onFailure) } -func (this *HooksExecutor) onStatus(statusMessage string, elapsedSeconds int64) error { - v := []string{ - fmt.Sprintf("GH_OST_STATUS='%s'", statusMessage), - fmt.Sprintf("GH_OST_ELAPSED_SECONDS='%d'", elapsedSeconds), - } - return this.executeHooks(onStatus, v...) +func (this *HooksExecutor) onStatus(statusMessage string) error { + v := fmt.Sprintf("GH_OST_STATUS='%s'", statusMessage) + return this.executeHooks(onStatus, v) } func (this *HooksExecutor) onStopReplication() error { diff --git a/go/logic/migrator.go b/go/logic/migrator.go index c44d196..799e70b 100644 --- a/go/logic/migrator.go +++ b/go/logic/migrator.go @@ -1102,7 +1102,7 @@ func (this *Migrator) printStatus(rule PrintStatusRule, writers ...io.Writer) { fmt.Fprintln(w, status) if elapsedSeconds%60 == 0 { - this.hooksExecutor.onStatus(status, elapsedSeconds) + this.hooksExecutor.onStatus(status) } }