Skip to content

Commit

Permalink
fix issue in director/producer
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Apr 17, 2023
1 parent cb8779e commit aad781a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions services/director/src/simcore_service_director/producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ async def _get_service_state(
log.debug("Getting service %s state", service_name)
tasks = await client.tasks.list(filters={"service": service_name})

async def _wait_for_tasks(tasks):
async def _wait_for_tasks():
task_started_time = datetime.utcnow()
while (datetime.utcnow() - task_started_time) < timedelta(seconds=20):
tasks = await client.tasks.list(filters={"service": service_name})
Expand All @@ -544,7 +544,7 @@ async def _wait_for_tasks(tasks):
return
await asyncio.sleep(1) # let other events happen too

await _wait_for_tasks(tasks)
await _wait_for_tasks()
if not tasks:
return (ServiceState.FAILED, "getting state timed out")

Expand Down Expand Up @@ -873,7 +873,7 @@ async def start_service(
service_tag: str,
node_uuid: str,
node_base_path: str,
request_simcore_user_agent: str
request_simcore_user_agent: str,
) -> Dict:
# pylint: disable=C0103
log.debug(
Expand Down Expand Up @@ -1131,7 +1131,7 @@ async def stop_service(app: web.Application, node_uuid: str, save_state: bool) -
"Could not save state because %s is unreachable [%s]."
"Resuming stop_service.",
service_host_name,
err
err,
)

# remove the services
Expand Down

0 comments on commit aad781a

Please sign in to comment.