Allow daemon-options to be passed through #916

Merged
merged 3 commits into from Jun 6, 2016

Projects

None yet

4 participants

@rfroetscher
rfroetscher commented May 16, 2016 edited

hey @albus522,

here I have a more flexible update of #459. the idea here is to allow users to pass options through to the daemons gem. i'm specifically interested in telling daemons not to forcefully kill my workers after their timeout.

your last question on that thread was whether the option they were adding in that PR was tied to a certain minimum version of the daemons gem. it is, but that minimum version of daemons (1.1.0) was released in 2010 https://rubygems.org/gems/daemons/versions/1.2.3.

this update also allows you to pass whatever options you want through so it shouldnt even matter what version of daemons you are using, so long as your daemon-options are geared towards the right version.

this works like this:

rob@rob-ubuntu ~/workspace/lumos_data_warehouse (test_of_delayed_job) => RAILS_ENV=development bundle exec script/delayed_job --queues=restart_test -n 1 --daemon-options='--no_wait' -p dj_worker start
delayed_job: process with pid 8879 started.
rob@rob-ubuntu ~/workspace/lumos_data_warehouse (test_of_delayed_job) => RAILS_ENV=development bundle exec script/delayed_job stop --daemon-options='--no_wait'
rob@rob-ubuntu ~/workspace/lumos_data_warehouse (test_of_delayed_job) => RAILS_ENV=development bundle exec script/delayed_job status
delayed_job: running [pid 8879]
rob@rob-ubuntu ~/workspace/lumos_data_warehouse (test_of_delayed_job) => RAILS_ENV=development bundle exec script/delayed_job status
delayed_job: running [pid 8879]
rob@rob-ubuntu ~/workspace/lumos_data_warehouse (test_of_delayed_job) => RAILS_ENV=development bundle exec script/delayed_job status
delayed_job: no instances running

please let me know if you have any questions or concerns.

@coveralls
coveralls commented May 16, 2016 edited

Coverage Status

Coverage decreased (-0.07%) to 91.127% when pulling 5bde69e on rfroetscher:no_wait into 1e67917 on collectiveidea:master.

@coveralls
coveralls commented May 16, 2016 edited

Coverage Status

Coverage decreased (-0.07%) to 91.127% when pulling f212101 on rfroetscher:no_wait into 1e67917 on collectiveidea:master.

@rfroetscher

solves #593

@apurvis
apurvis commented May 17, 2016

👍

@rfroetscher

@albus522 anything i can do to make this acceptable?

@rfroetscher

@sferik any feedback on this?

@albus522 albus522 merged commit e3772d4 into collectiveidea:master Jun 6, 2016

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
@rfroetscher

Thanks for merging!

@mike-stewart mike-stewart added a commit to mike-stewart/delayed_job that referenced this pull request Jun 9, 2016
@mike-stewart mike-stewart Apply collectiveidea/delayed_job#916 change to delayed_job 3.0.5 ac26867
@mike-stewart mike-stewart added a commit to mike-stewart/delayed_job that referenced this pull request Jun 9, 2016
@mike-stewart mike-stewart Apply collectiveidea/delayed_job#916 change to delayed_job 3.0.5 c6661f5
@rfroetscher

@albus522 Would you guys be able to make a release?

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