Ruby version: 2.5.5
Sidekiq / Pro / Enterprise version(s): Sidekiq Enterprise 5.2.6
After upgrading to 5.2.6 we noticed an unexpected behaviour in our metrics for one of queues. Right after the upgrade, queue delays went up to hours, which didn't reflect the reality on the enqueued items.
To calculate the delay, we use this formula:
queueing_delay_ms = (Time.current.to_f * 1000).to_i - (msg["enqueued_at"].to_f * 1000).to_i
The peculiarity on this queue is that we schedule jobs for many days in the future under it. It also has a higher chance of jobs failing and being retried.
We believe the changes introduced in https://github.com/mperham/sidekiq/commit/cfe53e5fadfe88c53b62608d1dfc75ecf2ac18a0 to be culprit. Before these changes, we would get a new enqueued_at value when it was re-enqueued. Now, the original value is kept.
Is this side-effect intended? If so, then we may look to alternatives. Any hint on how to handle it now, would be greatly appreciated!
Not intended. I wanted to test an aspect of the Web UI and didn't realize this would break other cases. Thank you for reporting!
Thanks for the quick response and looking into it!
Most helpful comment
Not intended. I wanted to test an aspect of the Web UI and didn't realize this would break other cases. Thank you for reporting!