Skip to content
Snippets Groups Projects
Commit c99e4212 authored by Robert Latta's avatar Robert Latta
Browse files

changed to use asynch commands instead of group to avoid crashing dev environment

parent 3ad21825
No related branches found
Tags 0.40
No related merge requests found
...@@ -458,27 +458,28 @@ def launch_refresh_cache_all(config): ...@@ -458,27 +458,28 @@ def launch_refresh_cache_all(config):
# first batch of subtasks: refresh cached opsdb data # first batch of subtasks: refresh cached opsdb data
subtasks = [ subtasks = [
update_junosspace_device_list.s(), update_junosspace_device_list.apply_async(),
update_interfaces_to_services.s(), update_interfaces_to_services.apply_async(),
update_geant_lambdas.s(), update_geant_lambdas.apply_async(),
update_circuit_hierarchy.s() update_circuit_hierarchy.apply_async()
] ]
[x.get() for x in subtasks]
results = group(subtasks).apply_async()
results.join()
# second batch of subtasks: # second batch of subtasks:
# alarms db status cache # alarms db status cache
# juniper netconf & snmp data # juniper netconf & snmp data
subtasks = [ subtasks = [
update_equipment_locations.s(), update_equipment_locations.apply_async(),
] ]
for hostname in _derive_router_hostnames(config): for hostname in _derive_router_hostnames(config):
logger.debug( logger.debug(
'queueing router refresh jobs for %r' % hostname) 'queueing router refresh jobs for %r' % hostname)
subtasks.append(reload_router_config.s(hostname)) subtasks.append(reload_router_config.apply_async(args=[hostname]))
break
return [r.id for r in group(subtasks).apply_async()] [x.get() for x in subtasks]
return [x.id for x in subtasks]
def check_task_status(task_id): def check_task_status(task_id):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment