Async worker: reconnect correctly after redis connection errors#255
Async worker: reconnect correctly after redis connection errors#255
Conversation
The client was not namespaced, so the worker was trying to fetch jobs from the incorrect queues after recovering from a redis connection error.
| worker.shutdown | ||
| worker_thread.join |
There was a problem hiding this comment.
hm, I think you could just force MRI to kill the thread here if it did not finish in time to make sure we won't wait too much for whatever reason (ie. actually having some sort of connectivity problem, such as having the server respond very slowly), because as it stands we'll raise just fine, but we'll have to wait.
There was a problem hiding this comment.
I tried it without applying the fix and it worked fine.
There was a problem hiding this comment.
Writing a correct integration test for this is complicated because of some limitations of the testing suite that require some work to be fixed.
I'll merge this now because we need the fix to unblock other work, I'll try to come back to this next week.
|
bors r=@unleashed |
|
🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set. |
|
👎 Rejected by PR status |
d37f72a to
4f73a1c
Compare
|
bors retry |
|
Build succeeded: |
This PR fixes a bug: the async worker was not reconnecting correctly after redis connection errors.
The reason is that it was instantiating a client without the "resque" namespace.