Closed PaulFlanaganGenscape closed 3 years ago
Hi,
Thank you for reporting this error, actually this error is coming from the function rq.contrib.legacy.cleanup_ghosts
, it is using the default Worker
class, that's why the class method Worker.find_by_key
is raising this error because it's checking if the worker name starts with the original prefix Worker.redis_worker_namespace_prefix
(rq:worker:
) and not the custom class' prefix CustomWorker.redis_worker_namespace_prefix
(rq:custom:worker:
).
This has to be fixed in the rq repo, the cleanup_ghosts
must be fixed to use the custom worker class cli_config.worker_class
.
If you want a temporary fix, use a custom worker prefix that starts with rq:worker:
, for example:
class CustomWorker(Worker):
redis_worker_namespace_prefix = 'rq:worker:custom'