3scale / apisonator

Red Hat 3scale API Management Apisonator backend
https://3scale.net
Apache License 2.0
36 stars 27 forks source link

Async worker: stop sharing redis client instance with the job fetcher thread #253

Closed davidor closed 3 years ago

davidor commented 3 years ago

This PR fixes a bug that triggers sometimes in the worker with async enabled and when a job fails. The root cause is that the main thread and the one that fetches job from the queue were sharing the same Redis instance to access the queue DB. Reusing the same instance raises errors because a fiber is shared between different threads.

This PR also includes some related fixes in the test suite.

bors[bot] commented 3 years ago

Build succeeded: