|
12 | 12 | from servicelib.common_headers import UNDEFINED_DEFAULT_SIMCORE_USER_AGENT_VALUE |
13 | 13 | from servicelib.logging_errors import create_troubleshotting_log_kwargs |
14 | 14 | from servicelib.logging_utils import log_catch, log_context |
15 | | -from servicelib.utils import limited_as_completed, logged_gather |
| 15 | +from servicelib.utils import limited_as_completed, limited_gather |
16 | 16 |
|
17 | 17 | from ..dynamic_scheduler import api as dynamic_scheduler_service |
18 | 18 | from ..projects._projects_service import ( |
@@ -53,7 +53,7 @@ async def _remove_service( |
53 | 53 | with log_catch(_logger, reraise=False), log_context( |
54 | 54 | _logger, |
55 | 55 | logging.INFO, |
56 | | - msg=f"removing {(service.node_uuid, service.host)} with {save_service_state=}", |
| 56 | + f"removing {(service.node_uuid, service.host)} with {save_service_state=}", |
57 | 57 | ): |
58 | 58 | await dynamic_scheduler_service.stop_dynamic_service( |
59 | 59 | app, |
@@ -150,11 +150,11 @@ async def remove_orphaned_services( |
150 | 150 | _logger.debug("Found orphaned services: %s", orphaned_running_service_ids) |
151 | 151 | # NOTE: no need to not reraise here, since we catch everything above |
152 | 152 | # and logged_gather first runs everything |
153 | | - await logged_gather( |
| 153 | + await limited_gather( |
154 | 154 | *( |
155 | 155 | _remove_service(app, node_id, running_services_by_id[node_id]) |
156 | 156 | for node_id in orphaned_running_service_ids |
157 | 157 | ), |
158 | 158 | log=_logger, |
159 | | - max_concurrency=_MAX_CONCURRENT_CALLS, |
| 159 | + limit=_MAX_CONCURRENT_CALLS, |
160 | 160 | ) |
0 commit comments