mirror of
https://github.com/ansible/awx.git
synced 2026-03-02 01:08:48 -03:30
Do not run task system on secondaries.
This commit is contained in:
@@ -164,6 +164,10 @@ def rebuild_graph(message):
|
|||||||
orphaned running tasks, and creating dependencies for new tasks before
|
orphaned running tasks, and creating dependencies for new tasks before
|
||||||
generating directed edge relationships between those tasks.
|
generating directed edge relationships between those tasks.
|
||||||
"""
|
"""
|
||||||
|
# Sanity check: Only do this on the primary node.
|
||||||
|
if Instance.objects.my_role() == 'secondary':
|
||||||
|
return None
|
||||||
|
|
||||||
inspector = inspect()
|
inspector = inspect()
|
||||||
if not hasattr(settings, 'IGNORE_CELERY_INSPECTOR'):
|
if not hasattr(settings, 'IGNORE_CELERY_INSPECTOR'):
|
||||||
active_task_queues = inspector.active()
|
active_task_queues = inspector.active()
|
||||||
|
|||||||
Reference in New Issue
Block a user