Skip to content

Commit ea28520

Browse files
authored
fix: [AAP-30505] Overwrite PUBSUB_CHANNEL_TEMPLATE in RQ worker (#1051)
1 parent 3bf80b2 commit ea28520

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/aap_eda/core/tasking/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ def enable_redis_prefix():
176176
rq.queue.Queue.redis_queues_keys = f"{redis_prefix}:queues"
177177

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

0 commit comments

Comments
 (0)