... This is so code which calls #stats does not conflate job failures with stats failures.
Swallow (and attempt to retry) Redis timeout errors when updating sta…
…ts. This is so code which calls #stats does not conflate job failures with stats failures.
Shouldn't we swallow anything generated by the redis block, not just TimeoutError?
It does. It just retries for TimeoutErrors.
In my experience of seeing this, I've only seen Redis::TimeoutErrors which I know are safe to retry. If something else is happening I don't know if it's safe to retry it (probably is but just to be safe)
Oh right, and we shouldn't retry generic network exceptions?
That's true, we should retry those things like Errno::ECONNRESET and such. I'll just have it retry everything.
Retry all exceptions.
I'd suggest a sleep(1) in there for retries too. Should handle the case of restarting Redis while Sidekiq is actively working.
StandardError is superfluous.
Sleep before retrying.
Adds a changelog entry.
Many thanks for a swift review.