refactor(cloud): move package into workspace member
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
"""Configuration for the cloud runtime with conservative inert defaults."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class CloudConfig:
|
||||
"""Tunable cloud-runtime knobs.
|
||||
|
||||
Defaults are deliberately conservative so importing ``cloud`` is inert
|
||||
until a caller actually registers a second host or submits through the SDK.
|
||||
"""
|
||||
|
||||
# How frequently a host is expected to push its device snapshot. Informational
|
||||
# only at runtime (the pool does not run a timer); drives operator expectations.
|
||||
sync_interval_seconds: int = 30
|
||||
|
||||
# A host whose ``last_seen_at`` is older than this threshold reports all its
|
||||
# devices as ``unreachable`` on the next pool read.
|
||||
stale_after_seconds: int = 90
|
||||
|
||||
# Bound on the number of ``queued`` ScheduledTasks. Submissions beyond this
|
||||
# are rejected rather than letting the backlog grow without limit.
|
||||
max_queue_depth: int = 100
|
||||
|
||||
# Strategy name looked up in the AssignmentStrategy registry (default fifo_match).
|
||||
default_assignment_strategy: str = "fifo_match"
|
||||
|
||||
# Public SDK URL prefix. Mounted as the FastAPI APIRouter ``prefix``.
|
||||
api_version_prefix: str = "/v1"
|
||||
|
||||
# SQLite file path (relative to CWD or absolute) owned by CloudStore.
|
||||
db_path: str = "cloud/cloud.sqlite3"
|
||||
Reference in New Issue
Block a user