Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporarily skip queues on too many throttled jobs in a row #163

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

ixti
Copy link
Owner

@ixti ixti commented Nov 18, 2023

Brings back "cooldown" queues in case they return throttled jobs only functionality. One can configure the behaviour with:

Sidekiq::Throttled.configure do |config|
  # Period in seconds to exclude queue from polling in case it returned
  # {config.cooldown_threshold} amount of throttled jobs in a row. Set
  # this value to `nil` to disable cooldown manager completely.
  # Default: 2.0
  config.cooldown_period = 2.0

  # Amount of throttled jobs returned from the queue subsequently after which
  # queue will be excluded from polling.
  # Default: 1 (cooldown after first throttled job)
  config.cooldown_threshold = 1
end

Related: e5ac585
Closes: #160

@ixti ixti force-pushed the revive-exhausted-queues branch 2 times, most recently from a80dcb6 to 341faec Compare November 19, 2023 16:46
@ixti ixti marked this pull request as ready for review November 19, 2023 17:28
@ixti ixti changed the title Bring back throttled queues cooler Temporarily skip queues on too many throttled jobs in a row Nov 19, 2023
@ixti ixti force-pushed the revive-exhausted-queues branch from 2f0c614 to 6e41e75 Compare November 19, 2023 17:45
README.adoc Outdated Show resolved Hide resolved
lib/sidekiq/throttled/expirable_set.rb Outdated Show resolved Hide resolved
ixti added a commit that referenced this pull request Nov 19, 2023
@ixti ixti force-pushed the revive-exhausted-queues branch from 48f96ca to 736acc3 Compare November 20, 2023 00:01
Brings back feature that was removed in:

  e5ac585

See README.adoc for possible configuration

Resolve: #160
Resolve: #157
Co-authored-by: Alexandr Elhovenko <freemanoid321@gmail.com>
Signed-off-by: Alexey Zapparov <alexey@zapparov.com>
@ixti ixti force-pushed the revive-exhausted-queues branch from 736acc3 to 934bdd9 Compare November 20, 2023 01:51
@ixti ixti merged commit 934bdd9 into main Nov 20, 2023
4 checks passed
@ixti ixti deleted the revive-exhausted-queues branch November 20, 2023 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants