Skip to content

Commit

Permalink
change run inactive cutoff default to 6 minutes. cleanup unused const…
Browse files Browse the repository at this point in the history
…ant (#392)
  • Loading branch information
saikonen authored Oct 23, 2023
1 parent 13a7db8 commit 65d41dd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions services/ui_backend_service/data/db/tables/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)


Expand Down
1 change: 0 additions & 1 deletion services/ui_backend_service/data/db/tables/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from typing import List, Tuple
from .base import (
AsyncPostgresTable,
HEARTBEAT_THRESHOLD,
OLD_RUN_FAILURE_CUTOFF_TIME,
RUN_INACTIVE_CUTOFF_TIME,
)
Expand Down
2 changes: 1 addition & 1 deletion services/ui_backend_service/docs/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 65d41dd

Please sign in to comment.