mirror of
https://github.com/ansible/awx.git
synced 2026-05-06 17:07:36 -02:30
Set capacity to zero before shutting down older instances in the cluster.
This commit is contained in:
@@ -195,6 +195,10 @@ def cluster_node_heartbeat(self):
|
|||||||
other_inst.version,
|
other_inst.version,
|
||||||
inst.hostname,
|
inst.hostname,
|
||||||
inst.version))
|
inst.version))
|
||||||
|
# Set the capacity to zero to ensure no Jobs get added to this instance.
|
||||||
|
# The heartbeat task will reset the capacity to the system capacity after upgrade.
|
||||||
|
inst.capacity = 0
|
||||||
|
inst.save()
|
||||||
stop_local_services(['uwsgi', 'celery', 'beat', 'callback', 'fact'])
|
stop_local_services(['uwsgi', 'celery', 'beat', 'callback', 'fact'])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user