Closed slawlor closed 1 year ago
Patch coverage: 87.96
% and project coverage change: +0.33
:tada:
Comparison is base (
a40d75b
) 79.60% compared to head (498df63
) 79.93%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
This PR solves a small bug in worker lifecycle management.
currently If the factory has a queue of backlogged work, and a worker dies, when it's restarted, it won't immediately dequeue the next message from the factory's queue. It will only get a message on the next incoming factory message which additionally since there's a "free" worker, even with a backlog of work, that incoming message will jump the queue.
This is incorrect behavior, and queue'd message should be served first. This change makes it that when a worker is re-created, it will dequeue a message as the worker is now "free".
Tests added to cover this scenario going forward.