diff --git a/dataworkspace/dataworkspace/apps/applications/spawner.py b/dataworkspace/dataworkspace/apps/applications/spawner.py index 1f73546f24..d13b976f68 100644 --- a/dataworkspace/dataworkspace/apps/applications/spawner.py +++ b/dataworkspace/dataworkspace/apps/applications/spawner.py @@ -478,8 +478,8 @@ def state( # pylint: disable=too-many-return-statements now = datetime.datetime.now() thirty_minutes_ago = now - datetime.timedelta(minutes=30) - two_minutes_ago = now - datetime.timedelta(minutes=2) - four_minutes_ago = now - datetime.timedelta(minutes=4) + five_minutes_ago = now - datetime.timedelta(minutes=5) + eight_minutes_ago = now - datetime.timedelta(minutes=8) task_arn = spawner_application_id_parsed.get("task_arn") pipeline_id = spawner_application_id_parsed.get("pipeline_id") @@ -505,24 +505,24 @@ def state( # pylint: disable=too-many-return-statements else: task_should_be_created = created_date - # ... give two minutes to create the task... + # ... give five minutes to create the task... if not task_arn: - if task_should_be_created > two_minutes_ago: + if task_should_be_created > five_minutes_ago: return "RUNNING" logger.exception( - "Task not created within sixty seconds: %s %s", + "Task not created within five minutes: %s %s", spawner_application_id_parsed, proxy_url, ) return "STOPPED" - # .... give four minutes to get the task itself (to mitigate eventual consistency)... + # .... give eight minutes to get the task itself (to mitigate eventual consistency)... task = _fargate_task_describe(cluster_name, task_arn) - if task is None and task_should_be_created > four_minutes_ago: + if task is None and task_should_be_created > eight_minutes_ago: return "RUNNING" if task is None: logger.exception( - "Task not running within 3 minute: %s %s", + "Task not running within 8 minutes: %s %s", spawner_application_id_parsed, proxy_url, )