arq icon indicating copy to clipboard operation
arq copied to clipboard

Unable to differentiate results

Open euri10 opened this issue 3 years ago • 1 comments
trafficstars

In https://github.com/samuelcolvin/arq/pull/191 a default queue name was introduced with the following reasoning:

When using a single central Redis with multiple services, it's necessary to use different queues.

It's indeed great to have, however we still have, the jobs, the results, in fact all the constants defined in https://github.com/samuelcolvin/arq/blob/1495be6c234509df1dfdc0db620388d909c8cdb8/arq/constants.py#L2-L6

that are indistinguishable one from the other.

suppose I have one single redis with queue_a, queue_b and queue_c, all results will be in arq:result

It would be cool to have those constants built from the queue_name passed, or another mechanism to be able to better differentiate them: is that idea worth discussing further and you'd be ok to see a PR on ?

euri10 avatar Sep 19 '22 07:09 euri10

I think this is a great idea. Looking at the code, it seems like the implementor had this in mind, since the keys are already named prefix.

How ever, changing this now would probably be a breaking change? @samuelcolvin

It's probably not hard to implement, but I imagine it will be a lot of code-changes. I can do this if @samuelcolvin accepts.

JonasKs avatar Apr 04 '23 17:04 JonasKs