AgileConsultingLLC / capistrano3-delayed-job

Manage start/stop/restart/status of DelayedJob workers using Capistrano 3
MIT License
45 stars 19 forks source link

dj worker configuration lost after reboot #15

Open ConfusedVorlon opened 6 years ago

ConfusedVorlon commented 6 years ago

Hi,

I'm using the pool configuration options

set :delayed_job_pools, {
    'high_priority' => 1,      # one just for the important stuff
    '*' => 3    #three workers working any queue
}

this works great - but it is lost if I reboot the server.

I'm currently using https://github.com/javan/whenever to manage my crontab, and I can set

every :reboot do
  envcommand "bin/delayed_job  -n 1 --pool='high_priority:1' --pool='*:3' restart"
end

but that's duplication of the deploy config.

it would be great if capistrano could either add something to the crontab directly, or write a script that I could then call.

every :reboot do
  envcommand "command_to_run_whatever_capistrano_set_up_for_DJ"
end

alternatively - if there is already support for this kind of thing - can you add documentation?

many thanks!

rab commented 6 years ago

I also use whenever, but the thing that nags me is more the lack of an easy local command that I can run in the target environment (i.e., not from cap/ssh) so your last suggestion is the one that might find some traction in my brain (or which would be most likely to be fast-tracked as a pull request 🤔).

mauriciopasquier commented 4 years ago

Seconded, this would be really useful