FIX: Add onceoff job to remove old auto close topic sidekiq jobs.

This commit is contained in:
Guo Xiang Tan 2017-04-06 10:52:13 +08:00
parent 3eb125c39b
commit e8eaffbd72
1 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,10 @@
module Jobs
class RemoveOldAutoCloseJobs < Jobs::Onceoff
def execute_onceoff(args)
Jobs.cancel_scheduled_for(:close_topic)
# No need to enqueue new jobs since we have a scheduled job that will
# automatically enqueue the new jobs.
end
end
end