diff options
author | JoramWilander <jwawilander@gmail.com> | 2018-06-30 12:24:04 -0400 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2018-06-30 12:24:04 -0400 |
commit | 3848cb7e79e019e2f0878d6e2377ad36b3c7ca43 (patch) | |
tree | 98beeb962ffc6d7c3f8cd38651eaccab4a9685fa /migrations/scheduler.go | |
parent | 88c5e469ca869d9e8ceadb0f2b03e86005102f24 (diff) | |
parent | 2362a5b7f7c2b4bf2b35b104e8616d847b33b0be (diff) | |
download | chat-3848cb7e79e019e2f0878d6e2377ad36b3c7ca43.tar.gz chat-3848cb7e79e019e2f0878d6e2377ad36b3c7ca43.tar.bz2 chat-3848cb7e79e019e2f0878d6e2377ad36b3c7ca43.zip |
Merge branch 'master' into plugins-2
Diffstat (limited to 'migrations/scheduler.go')
-rw-r--r-- | migrations/scheduler.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/migrations/scheduler.go b/migrations/scheduler.go index 8a7ac30d0..5778c5cb3 100644 --- a/migrations/scheduler.go +++ b/migrations/scheduler.go @@ -59,7 +59,7 @@ func (scheduler *Scheduler) ScheduleJob(cfg *model.Config, pendingJobs bool, las if state == MIGRATION_STATE_IN_PROGRESS { // Check the migration job isn't wedged. - if job != nil && job.LastActivityAt < model.GetMillis()-MIGRATION_JOB_WEDGED_TIMEOUT_MILLISECONDS { + if job != nil && job.LastActivityAt < model.GetMillis()-MIGRATION_JOB_WEDGED_TIMEOUT_MILLISECONDS && job.CreateAt < model.GetMillis()-MIGRATION_JOB_WEDGED_TIMEOUT_MILLISECONDS { mlog.Warn("Job appears to be wedged. Rescheduling another instance.", mlog.String("scheduler", scheduler.Name()), mlog.String("wedged_job_id", job.Id), mlog.String("migration_key", key)) if err := scheduler.App.Jobs.SetJobError(job, nil); err != nil { mlog.Error("Worker: Failed to set job error", mlog.String("scheduler", scheduler.Name()), mlog.String("job_id", job.Id), mlog.String("error", err.Error())) |