collectiveidea / delayed_job

Database based asynchronous priority queue system -- Extracted from Shopify
http://groups.google.com/group/delayed_job
MIT License
4.82k stars 954 forks source link

Monitors do not shut down with script/delayed_job stop (with more than one worker running) #212

Open cannikin opened 13 years ago

cannikin commented 13 years ago

If you take a look at lib/delayed/backend/recipies.rb you'll see that any delayed_job_args are passed to the start and restart tasks, but not stop.

The problem is that if you enabled monitors with -m, and have multiple workers running (with -n 2 for example) the stop task will not stop the monitors, which will restart delayed_job. If you pass the -n 2 flag to stop then the monitors are turned off correctly (with or without the -m flag).

If you're only running one worker (with or without monitors) there is no issue. Likewise if you're running multiple workers without monitors, no problem. The problem only manifests with multiple workers + monitors.

saten commented 12 years ago

+1 on this one!