summaryrefslogtreecommitdiffstats
path: root/jobs/jobs.go
diff options
context:
space:
mode:
Diffstat (limited to 'jobs/jobs.go')
-rw-r--r--jobs/jobs.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/jobs/jobs.go b/jobs/jobs.go
index b367730b5..850491403 100644
--- a/jobs/jobs.go
+++ b/jobs/jobs.go
@@ -5,11 +5,12 @@ package jobs
import (
"context"
+ "fmt"
"time"
"net/http"
- l4g "github.com/alecthomas/log4go"
+ "github.com/mattermost/mattermost-server/mlog"
"github.com/mattermost/mattermost-server/model"
)
@@ -125,10 +126,10 @@ func (srv *JobServer) CancellationWatcher(ctx context.Context, jobId string, can
for {
select {
case <-ctx.Done():
- l4g.Debug("CancellationWatcher for Job: %v Aborting as job has finished.", jobId)
+ mlog.Debug(fmt.Sprintf("CancellationWatcher for Job: %v Aborting as job has finished.", jobId))
return
case <-time.After(CANCEL_WATCHER_POLLING_INTERVAL * time.Millisecond):
- l4g.Debug("CancellationWatcher for Job: %v polling.", jobId)
+ mlog.Debug(fmt.Sprintf("CancellationWatcher for Job: %v polling.", jobId))
if result := <-srv.Store.Job().Get(jobId); result.Err == nil {
jobStatus := result.Data.(*model.Job)
if jobStatus.Status == model.JOB_STATUS_CANCEL_REQUESTED {