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

Already on GitHub? Sign in to your account

Local Scaler killing process before finishing last job #16

Closed
pcasaretto opened this Issue Nov 3, 2011 · 2 comments

Comments

Projects
None yet
3 participants

It seems the process is getting killed somewhere between locking and actually doing the job.

ruby-1.9.2-p290 :001 > 10.times {delay.sleep(2)}
 => 10 
ruby-1.9.2-p290 :002 > [Worker(host:pcasaretto-MacBook-Pro.local pid:2122)] Starting job worker
[Worker(host:pcasaretto-MacBook-Pro.local pid:2122)] Object#sleep completed after 2.0599
[Worker(host:pcasaretto-MacBook-Pro.local pid:2122)] Object#sleep completed after 2.0271
[Worker(host:pcasaretto-MacBook-Pro.local pid:2122)] Object#sleep completed after 2.0240
[Worker(host:pcasaretto-MacBook-Pro.local pid:2122)] Object#sleep completed after 2.0239
[Worker(host:pcasaretto-MacBook-Pro.local pid:2122)] Object#sleep completed after 2.0243
[Worker(host:pcasaretto-MacBook-Pro.local pid:2122)] Object#sleep completed after 2.0247
[Worker(host:pcasaretto-MacBook-Pro.local pid:2122)] Object#sleep completed after 2.0236
[Worker(host:pcasaretto-MacBook-Pro.local pid:2122)] Object#sleep completed after 2.0249
[Worker(host:pcasaretto-MacBook-Pro.local pid:2122)] Object#sleep completed after 2.0253
[Worker(host:pcasaretto-MacBook-Pro.local pid:2122)] Exiting...
[Worker(host:pcasaretto-MacBook-Pro.local pid:2122)] Exiting...
[Worker(host:pcasaretto-MacBook-Pro.local pid:2122)] Exiting...
[Worker(host:pcasaretto-MacBook-Pro.local pid:2122)] Exiting...
[Worker(host:pcasaretto-MacBook-Pro.local pid:2122)] Exiting...
bash: line 1:  2122 Killed: 9               rake jobs:work
Delayed::Job.all
 => [#<Delayed::Backend::ActiveRecord::Job id: 10, priority: 0, attempts: 0, handler: "--- !ruby/struct:Delayed::PerformableMethod \nobject...", last_error: nil, run_at: "2011-11-03 11:51:16", locked_at: "2011-11-03 11:51:46", failed_at: nil, locked_by: "host:pcasaretto-MacBook-Pro.local pid:2122", created_at: "2011-11-03 11:51:16", updated_at: "2011-11-03 11:51:16">] 

I was having your same issue I believe. On my local development environment (OS X) it was not working correctly. I was having issues where the process was killed and it was still leaving a locked job in the delayed_job database. I've solved this issue on my local environment by just making some small changes to the local.rb file. I've issues a pull request so hopefully lostboy will pull it into his gem.

Owner

lostboy commented Feb 18, 2012

Hi guys, sorry for the long pause, I've pushed v1.0.1 of workless with some enhancements to the local scaler, let me know how you get on

@lostboy lostboy closed this Feb 18, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment