From a3a618d733f73e31f7e35faef3ff49b060c2080c Mon Sep 17 00:00:00 2001 From: chris meyers Date: Wed, 28 Feb 2018 15:07:18 -0500 Subject: [PATCH] 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. --- awx/main/tasks.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 7bf41c515d..1421f2ed41 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -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):