Pergunta

Why does resque-scheduler try to run a job that used to exist, but no longer does?

I used to have an old resque-scheduler job a few weeks ago, but have removed it:

EmailRelevantQuestions:
  every: 15m
  class: EmailRelevantQuestions
  queue: email_queue
  description: "Iterates through users and emails them relevant questions."

But for some reason this job is still firing every 15 minutes, and the class no longer exists in my codebase, or my scheduler?? My logs state:

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>

Is there some sort of cache?

ps. I recently updated my resque form 1.24 to 1.25...not sure if this caused the issue

Foi útil?

Solução

It looks like this was causing old jobs to come up from past creation:

Resque::Scheduler.dynamic = true
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top