Replies: 1 comment 2 replies
-
You can drop the average scheduled poll time in order to get more accurate job scheduling: Sidekiq.configure_server do |config|
config[: average_scheduled_poll_interval] = 3
end but I'm not interested in reducing the jitter. That's really necessary to smear out large blocks of failed jobs. Maybe instead of retrying with its jitter, you should catch the error and reschedule. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
First of all, thank you for your work in developing and maintaining Sidekiq.
I know the topic has been discussed in a few issues, notably the one pointed at in the documentation (#480), and understand the usecase for the jitter in the retries, but was wondering if you'd be open to variabilizing it.
I am well aware that sidekiq is not meant to schedule jobs precisely, but I feel like there is a big difference between "not precisely scheduling" and preventing a retry within less than 15 seconds, or a roughly regular retry. We are using sidekiq to poll the status of transactions on the blockchain, and saw results we did not expect when trying to poll every 3 seconds (more or less, considering the polling interval) using the
sidekiq_retry_in
block. Hence we found the jitter and read about why it was implemented. While it makes perfect sense to have one, I believe it's not a solution suiting every business needs, and offering the possibility to remove or reduce it on a per job basis would be very helpful.I have monkey patched it quite easily, adjusting the
JobRetry#process_retry
andJobRetry#delay_for
, but was wondering if you'd be open to a PR so that everyone can enjoy / benefit from the feature.Cheers
Beta Was this translation helpful? Give feedback.
All reactions