Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resque-scheduler -D fails on last scheduled job removal #430

Closed
wheelq opened this issue Aug 3, 2014 · 5 comments · Fixed by #442
Closed

resque-scheduler -D fails on last scheduled job removal #430

wheelq opened this issue Aug 3, 2014 · 5 comments · Fixed by #442
Labels

Comments

@wheelq
Copy link

wheelq commented Aug 3, 2014

When I add and remove a job, or add 5 jobs, and remove 5, scheduler fails on the last job removal:

/var/lib/gems/1.9.1/gems/resque-scheduler-3.0.0/lib/resque/scheduler.rb:295:in block in update_schedule': undefined methodkeys' for nil:NilClass (NoMethodError)

@wheelq
Copy link
Author

wheelq commented Aug 3, 2014

Here is more verbose response:

resque-scheduler: [INFO] 2014-08-03T21:35:24+00:00: queueing SendEmail (send_emails)
resque-scheduler: [INFO] 2014-08-03T21:35:29+00:00: Updating schedule
resque-scheduler: [DEBUG] 2014-08-03T21:35:29+00:00: Setting procline "resque-scheduler-3.0.0: Updating schedule"
/var/lib/gems/1.9.1/gems/resque-scheduler-3.0.0/lib/resque/scheduler.rb:295:in block in update_schedule': undefined methodkeys' for nil:NilClass (NoMethodError)
from /var/lib/gems/1.9.1/gems/resque-scheduler-3.0.0/lib/resque/scheduler.rb:292:in loop' from /var/lib/gems/1.9.1/gems/resque-scheduler-3.0.0/lib/resque/scheduler.rb:292:inupdate_schedule'
from /var/lib/gems/1.9.1/gems/resque-scheduler-3.0.0/lib/resque/scheduler.rb:57:in block in run' from /var/lib/gems/1.9.1/gems/resque-scheduler-3.0.0/lib/resque/scheduler.rb:53:inloop'
from /var/lib/gems/1.9.1/gems/resque-scheduler-3.0.0/lib/resque/scheduler.rb:53:in run' from /var/lib/gems/1.9.1/gems/resque-scheduler-3.0.0/lib/resque/scheduler/cli.rb:117:inrun_forever'
from /var/lib/gems/1.9.1/gems/resque-scheduler-3.0.0/lib/resque/scheduler/cli.rb:90:in run!' from /var/lib/gems/1.9.1/gems/resque-scheduler-3.0.0/lib/resque/scheduler/cli.rb:80:inrun!'
from /var/lib/gems/1.9.1/gems/resque-scheduler-3.0.0/bin/resque-scheduler:5:in <top (required)>' from /usr/local/bin/resque-scheduler:19:inload'
from /usr/local/bin/resque-scheduler:19:in `

'

@bugant bugant added the bug label Aug 4, 2014
@bugant
Copy link
Member

bugant commented Aug 4, 2014

Thank you @wheelq. I'll have a look at it as soon as possible.

@wheelq
Copy link
Author

wheelq commented Aug 9, 2014

my current fix is to create a dummy job that is not supposed to be run or runs once a year and I just do not delete it :)

@bugant
Copy link
Member

bugant commented Aug 18, 2014

@wheelq nice :) sorry for being so late, I'll try to resolve this issue ASAP.

@wheelq
Copy link
Author

wheelq commented Aug 18, 2014

I hope this would also solve the issue when trying to remove scheduled job twice so it doesn't crash

bugant pushed a commit that referenced this issue Aug 26, 2014
The reload_schedule! method invoked in update_schedule returns nil if no
more job is in the queue. Access the schedule Hash instead.

Fixes #430
bugant pushed a commit that referenced this issue Sep 1, 2014
The reload_schedule! method invoked in update_schedule returns nil if no
more job is in the queue. Access the schedule Hash instead.

Fixes #430
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants