Class | Delayed::Worker |
In: |
lib/delayed/worker.rb
|
Parent: | Object |
DEFAULT_LOG_LEVEL | = | 'info'.freeze |
DEFAULT_SLEEP_DELAY | = | 5 |
DEFAULT_MAX_ATTEMPTS | = | 25 |
DEFAULT_MAX_RUN_TIME | = | 4.hours |
DEFAULT_DEFAULT_PRIORITY | = | 0 |
DEFAULT_DELAY_JOBS | = | true |
DEFAULT_QUEUES | = | [].freeze |
DEFAULT_QUEUE_ATTRIBUTES | = | HashWithIndifferentAccess.new.freeze |
DEFAULT_READ_AHEAD | = | 5 |
Every worker has a unique name which by default is the pid of the process. There are some advantages to overriding this with something which survives worker restarts: Workers can safely resume working on tasks which are locked by themselves. The worker will assume that it crashed before.
Reschedule the job in the future (when a job fails). Uses an exponential scale depending on the number of failed attempts.