Is this the magic fix we have been searching for!?

This commit is contained in:
2025-06-11 13:41:15 +09:30
parent a6f56118a9
commit 2be0efeb90
+3
View File
@@ -323,6 +323,9 @@ def redis_subscribe(worker_id):
If a change to worker_status_ or worker_queue_ is detected, raise a flag in a global variable which will trigger the worker manager thread to take action
"""
redis_client = get_redis_client()
# Enable keyspace notifications in Redis
redis_client.config_set("notify-keyspace-events", "KA")
pubsub = redis_client.pubsub()
channels = [f"__keyspace@0__:worker_status_{worker_id}",
f"__keyspace@0__:worker_queue_{worker_id}"]