collectiveidea/delayed_job — Issue #298: Delayed job takes over 2min to start in production, over 1min to stop
Author: airblade
Created: 2011-10-19 10:17:13+00:00
State: open

I use these commands to start and stop delayed job via monit:

```
check process delayed_job
with pidfile /var/www/apps/myapp/shared/pids/delayed_job.pid
start program = "/bin/su - deploy -c 'cd /var/www/apps/myapp/current; RAILS_ENV=production bundle exec script/delayed_job start'"
stop program = "/bin/su - deploy -c 'cd /var/www/apps/myapp/current; RAILS_ENV=production bundle exec script/delayed_job stop'"
```

However the start command takes over 2min to execute, and the stop (with no pending or running jobs) over 1min. This makes my deployments glacially slow (Capistrano gets monit to stop and start delayed job).

There must be a faster way to do this. I'd greatly appreciate your suggestions.

I'm using delayed_job 2.1.4, daemons 1.1.0, Rails 3.0.10, Ruby 1.9.2-p290.