Skip to content
Snippets Groups Projects
Commit 5511062b authored by Mohammad Torkashvand's avatar Mohammad Torkashvand
Browse files

remove unused router_map pre-fetch in massive_redeploy_base_config_task

parent cf812c9f
No related branches found
No related tags found
1 merge request!432remove unused router_map pre-fetch in massive_redeploy_base_config_task
Pipeline #94823 passed
...@@ -105,13 +105,6 @@ def massive_redeploy_base_config_task( ...@@ -105,13 +105,6 @@ def massive_redeploy_base_config_task(
callback_route: str, callback_route: str,
) -> None: ) -> None:
"""Kicks off one Celery subtask per router, then runs the final callback.""" """Kicks off one Celery subtask per router, then runs the final callback."""
# 1. De dupe and fetch FQDNs (so subtasks don't hit the DB twice)
unique_ids = list(dict.fromkeys(selected_routers)) unique_ids = list(dict.fromkeys(selected_routers))
router_map = {}
for rid in unique_ids:
sub = Router.from_subscription(rid)
router_map[rid] = sub.router.router_fqdn
# 2. Build a chord: all process_one_router subtasks → finalize_massive_redeploy
header = [process_one_router.s(rid, tt_number) for rid in unique_ids] # type: ignore[attr-defined] header = [process_one_router.s(rid, tt_number) for rid in unique_ids] # type: ignore[attr-defined]
chord(header)(finalize_massive_redeploy.s(callback_route, unique_ids)) # type: ignore[attr-defined] chord(header)(finalize_massive_redeploy.s(callback_route, unique_ids)) # type: ignore[attr-defined]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment