rq
rq copied to clipboard
Support for custom class in Job class for custom Failed-, Started-, Finished-, ... -JobRegistry classes?
Both in the Queue class in the Worker class, can one find queue_class
job_class
https://github.com/rq/rq/blob/v1.10.1/rq/queue.py#L40
https://github.com/rq/rq/blob/v1.10.1/rq/worker.py#L101-L102
But what about making it possible in the Job to support custom Failed-, Started-, Finished-, ... -JobRegistry is it something that would be interest for, if I were to make a pull request with it? 😁 Because It would be useful to me to have this feature supported, but I can live without 😐
What kind of features specifically do you need in implementing custom registry classes?
Mainly, I want to be able to overwrite Redis key naming scheme for Failed-, Started-, Finished-, ... -JobRegistry
Well, there have been requests about adding support for namespaces. I suppose this is something we can consider, so you can do something like:
queue = Queue(name='foo', namespace='bar', connection=Redis)
I don't mind accepting a PR for this feature, but I'll warn you in advance that this will likely touch many areas in RQ's code base so the PR would be rather large.
I can, imagine, but at this point I have already been working on overwrites of the code, but using custom classes to achieve namespaces, so I think it would be a better to spend some time on trying to add the feature, hopefully I will get time in the new year to start working on it/take a look at it again