Skip to content

Commit

Permalink
fix: [AAP-30505] Overwrite PUBSUB_CHANNEL_TEMPLATE in RQ worker (#1051)
Browse files Browse the repository at this point in the history
  • Loading branch information
jshimkus-rh authored Sep 13, 2024
1 parent 3bf80b2 commit ea28520
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/aap_eda/core/tasking/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ def enable_redis_prefix():
rq.queue.Queue.redis_queues_keys = f"{redis_prefix}:queues"

# Worker.
# Although PUBSUB_CHANNEL_TEMPLATE is defined in rq.command (and we've
# overridden it there for any new uses) rq.worker, which we've already
# imported, imports it so we need to override that value as well.
rq.worker.PUBSUB_CHANNEL_TEMPLATE = rq.command.PUBSUB_CHANNEL_TEMPLATE
rq.worker.Worker.redis_worker_namespace_prefix = f"{redis_prefix}:worker:"
rq.worker.Worker.redis_workers_keys = f"{redis_prefix}:workers"
rq.worker_registration.REDIS_WORKER_KEYS = f"{redis_prefix}:workers"
Expand Down

0 comments on commit ea28520

Please sign in to comment.