Engine timings move to FLOW_* settings
NODE_STOP_TIMEOUT, REBUILD_WAIT, FLOW_REBUILD_WAIT, BACKOFF and CANCEL_GRACE keep their defaults and are read from Settings.
This commit is contained in:
@@ -8,6 +8,7 @@ from pydantic import (
|
||||
AnyUrl,
|
||||
BeforeValidator,
|
||||
EmailStr,
|
||||
Field,
|
||||
HttpUrl,
|
||||
PositiveInt,
|
||||
computed_field,
|
||||
@@ -163,6 +164,25 @@ class Settings(BaseSettings):
|
||||
# grew it then gives the memory back, and the next call pays its imports
|
||||
# again. 0, the default, keeps every worker warm.
|
||||
FLOW_WORKER_MAX_RSS_MB: int = 0
|
||||
# How long a node's `stop` may take before a rebuild moves on without it.
|
||||
# A broker that has gone away can leave a node waiting on an
|
||||
# acknowledgement that never comes.
|
||||
FLOW_NODE_STOP_TIMEOUT: float = 5.0
|
||||
# How long a request waits for a rebuild that is already running before it
|
||||
# is answered as busy: one for the whole pipeline, one for a single flow's.
|
||||
# Past either, the engine is wedged rather than busy.
|
||||
FLOW_PIPELINE_REBUILD_WAIT: float = 15.0
|
||||
FLOW_REBUILD_WAIT: float = 5.0
|
||||
# Seconds between restarts of a node's crashed loop, one step per attempt
|
||||
# with the last repeating. A JSON list in the environment.
|
||||
FLOW_RESTART_BACKOFF: Annotated[tuple[float, ...], Field(min_length=1)] = (
|
||||
1.0,
|
||||
5.0,
|
||||
30.0,
|
||||
60.0,
|
||||
)
|
||||
# How long a cancelled node loop gets to stop before it is abandoned.
|
||||
FLOW_CANCEL_GRACE: float = 5.0
|
||||
# How long the engine's own metrics, events and run records are kept.
|
||||
#: The largest body `PUT /artifacts` will take, in bytes. A checkpoint or a
|
||||
#: video segment is a legitimate artifact, so this is generous rather than
|
||||
|
||||
Reference in New Issue
Block a user