Skip to content

Commit

Permalink
Readme around raise_signal_exceptions option
Browse files Browse the repository at this point in the history
Allow increased visiblity around raise_signal_exceptions option which isn't obviously documented. This is helpful particular for those using Heroku which uses SIGTERMs quite liberally.
  • Loading branch information
joelr committed Mar 11, 2014
1 parent 885074f commit fb49f60
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -327,6 +327,8 @@ By default all jobs will be queued without a named queue. A default named queue

It is possible to disable delayed jobs for testing purposes. Set Delayed::Worker.delay_jobs = false to execute all jobs realtime.

It may be required to raise exceptions on SIGTERM signals, this will allow jobs to be unlocked and to be available to workers after a worker restart if sent the TERM signal. The default for this option is false.

Here is an example of changing job parameters in Rails:

```ruby
Expand All @@ -338,6 +340,7 @@ Delayed::Worker.max_run_time = 5.minutes
Delayed::Worker.read_ahead = 10
Delayed::Worker.default_queue_name = 'default'
Delayed::Worker.delay_jobs = !Rails.env.test?
Delayed::Worker.raise_signal_exceptions = :term
```

Cleaning up
Expand Down

0 comments on commit fb49f60

Please sign in to comment.