You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, it's a quite dangerous to use RQ in multiple projects, while using the same Redis instance. This is because, if you pick the same queue names, workers for different projects will potentially pick up jobs intended for the other project, which leads to failed jobs.
A solution to this is to instantiate every RQ object with a name space that is reflected in the internal Redis keys that RQ uses to store its data structures.
Ideally, each RQ object grows a namespace constructor argument, that, much like the connection argument, is explicitly passed in, or provided by pushing a namespace onto a namespace stack via context locals:
with Connection(c):
with Namespace('foo'):
q = Queue('default')
Currently, it's a quite dangerous to use RQ in multiple projects, while using the same Redis instance. This is because, if you pick the same queue names, workers for different projects will potentially pick up jobs intended for the other project, which leads to failed jobs.
A solution to this is to instantiate every RQ object with a name space that is reflected in the internal Redis keys that RQ uses to store its data structures.
Ideally, each RQ object grows a
namespace
constructor argument, that, much like theconnection
argument, is explicitly passed in, or provided by pushing a namespace onto a namespace stack via context locals:or:
Timeline:
This is not really a priority right now, but it would be nice to have this eventually.
The text was updated successfully, but these errors were encountered: