Set capacity to zero before shutting down older instances in the cluster.

This commit is contained in:
Wayne Witzel III 2017-07-18 09:06:06 -04:00
parent c06d4eaa08
commit 8cf3a2867c

View File

@ -195,6 +195,10 @@ def cluster_node_heartbeat(self):
other_inst.version,
inst.hostname,
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'])