diff --git a/services/ui_backend_service/data/db/tables/base.py b/services/ui_backend_service/data/db/tables/base.py index 9bba522b..1365b58b 100644 --- a/services/ui_backend_service/data/db/tables/base.py +++ b/services/ui_backend_service/data/db/tables/base.py @@ -19,9 +19,9 @@ os.environ.get("OLD_RUN_FAILURE_CUTOFF_TIME", 60 * 60 * 24 * 1000 * 1) ) # Time before a run with a heartbeat will be considered inactive (and thus failed). -# Default to 1 day (in seconds) +# Default to 6 minutes (in seconds) RUN_INACTIVE_CUTOFF_TIME = int( - os.environ.get("RUN_INACTIVE_CUTOFF_TIME", 60 * 60 * 24 * 1) + os.environ.get("RUN_INACTIVE_CUTOFF_TIME", 60 * 6) ) diff --git a/services/ui_backend_service/data/db/tables/run.py b/services/ui_backend_service/data/db/tables/run.py index 1cb97cfa..27c598fe 100644 --- a/services/ui_backend_service/data/db/tables/run.py +++ b/services/ui_backend_service/data/db/tables/run.py @@ -3,7 +3,6 @@ from typing import List, Tuple from .base import ( AsyncPostgresTable, - HEARTBEAT_THRESHOLD, OLD_RUN_FAILURE_CUTOFF_TIME, RUN_INACTIVE_CUTOFF_TIME, ) diff --git a/services/ui_backend_service/docs/environment.md b/services/ui_backend_service/docs/environment.md index 7612ea17..166a065a 100644 --- a/services/ui_backend_service/docs/environment.md +++ b/services/ui_backend_service/docs/environment.md @@ -73,7 +73,7 @@ The threshold parameters for heartbeat checks can also be configured when necess `OLD_RUN_FAILURE_CUTOFF_TIME` [ for runs that do not have a heartbeat, controls at what point a running status run should be considered failed. Default is 1 day (in milliseconds)] -`RUN_INACTIVE_CUTOFF_TIME` [ for runs that have a heartbeat, controls how long a run with a failed heartbeat should wait for possibly queued tasks to start and resume heartbeat updates. Default is 1 day (in seconds)] +`RUN_INACTIVE_CUTOFF_TIME` [ for runs that have a heartbeat, controls how long a run with a failed heartbeat should wait for possibly queued tasks to start and resume heartbeat updates. Default is 6 minutes (in seconds)] ## Baseurl configuration