Commit 73e82fe8 by Őry Máté

tasks: workaround disappearing queues

parent 7e53c523
...@@ -28,7 +28,7 @@ def check_queue(storage, queue_id, priority): ...@@ -28,7 +28,7 @@ def check_queue(storage, queue_id, priority):
if priority is not None: if priority is not None:
queue_name = queue_name + "." + priority queue_name = queue_name + "." + priority
inspect = celery.control.inspect() inspect = celery.control.inspect()
inspect.timeout = 0.1 inspect.timeout = 0.5
active_queues = inspect.active_queues() active_queues = inspect.active_queues()
if active_queues is None: if active_queues is None:
return False return False
......
...@@ -55,7 +55,7 @@ def get_queues(): ...@@ -55,7 +55,7 @@ def get_queues():
result = cache.get(key) result = cache.get(key)
if result is None: if result is None:
inspect = celery.control.inspect() inspect = celery.control.inspect()
inspect.timeout = 0.1 inspect.timeout = 0.5
result = inspect.active_queues() result = inspect.active_queues()
logger.debug('Queue list of length %d cached.', len(result)) logger.debug('Queue list of length %d cached.', len(result))
cache.set(key, result, 10) cache.set(key, result, 10)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment