1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 06:51:10 +03:00

call node init procedures as early as possible

* invoke the first heartbeat as early as possible. Results in a much
better user experience where when a user scales up an awx node, the node
appears with capacity earlier.
This commit is contained in:
chris meyers 2018-02-28 15:07:18 -05:00
parent 8d57b84251
commit 5c647c2a0d

View File

@ -225,6 +225,10 @@ def handle_ha_toplogy_worker_ready(sender, **kwargs):
logger.info("Workers on tower node '{}' unsubscribed from queues {} and subscribed to queues {}"
.format(instance.hostname, removed_queues, added_queues))
# Expedite the first hearbeat run so a node comes online quickly.
cluster_node_heartbeat.apply([])
apply_cluster_membership_policies.apply([])
@celeryd_init.connect
def handle_update_celery_routes(sender=None, conf=None, **kwargs):