sidekiq-throttled
sidekiq-throttled copied to clipboard
Allow configuring whether throttled jobs are put back on the queue immediately or scheduled for the future
This adds support for setting the requeue_strategy
for a job, to specify what we should do with throttled jobs. The default is :enqueue
, which is the current behavior: re-add it to the end of the queue. The other option is :schedule
, which schedules the job for a time in the future when we think we'll have capacity to process it.
It's also possible to set the default_requeue_strategy
in the configuration, to set this behavior for all jobs that do not individually specify a requeue_strategy
.
This may be relevant to Issue #36.
Unrelatedly, there's a commit in here that changes the format of some require_relative
lines, to comply with the new Rubocop rule Style/RedundantCurrentDirectoryInPath
. I don't feel strongly about this commit; I only added it so that rubocop would pass.