为什么resque-scheduler会尝试运行以前存在但不再存在的作业?
几周前,我曾经有一个旧的resque-scheduler工作,但已将其删除了:
EmailRelevantQuestions:
every: 15m
class: EmailRelevantQuestions
queue: email_queue
description: "Iterates through users and emails them relevant questions."
但由于某种原因,这项工作仍然每15分钟一次,并且我的代码库或我的调度程序中不再存在该类?我的日志状态:
2013-09-18 15:18:42.267177+00:00 app scheduler.1 - - 2013-09-18 10:18:42 queueing EmailRelevantQuestions (EmailRelevantQuestions)
2013-09-18 15:18:42.600357+00:00 app scheduler.1 - - 2013-09-18 10:18:42 queueing FrequentWorker (FrequentWorker)
2013-09-18 15:18:43.817671+00:00 app resque.1 - - *** Checking daily_queue
2013-09-18 15:18:43.820166+00:00 app resque.1 - - *** Checking email_queue
2013-09-18 15:18:43.826799+00:00 app resque.1 - - *** Found job on email_queue
2013-09-18 15:18:43.826914+00:00 app resque.1 - - *** got: (Job{email_queue} | EmailRelevantQuestions | [])
2013-09-18 15:18:43.832159+00:00 app resque.1 - - *** resque-1.25.0: Processing email_queue since 1379517523 [No Name]
2013-09-18 15:18:43.933346+00:00 app resque.1 - - *** Running after_fork hooks with [(Job{email_queue} | EmailRelevantQuestions | [])]
2013-09-18 15:18:43.944943+00:00 app resque.1 - - *** (Job{email_queue} | EmailRelevantQuestions | []) ***FAILED***: #<NameError: uninitialized constant EmailRelevantQuestions>
是否有某种缓存?
PS。我最近将我的resque表格1.24更新为1.25 ...不确定是否会导致问题
答案 0 :(得分:1)
看起来这导致旧工作从过去的创作中产生:
Resque::Scheduler.dynamic = true