sync update from LAN repo (source dhk-1 @ 3b1ec5b4)
This commit is contained in:
1 parent
da6521b6cb
commit
264e2200d6
995 files changed
+148105
-13399
No files matched your search
+23
@@ -0,0 +1,23 @@
|
||||
"""Resource budgets shared by users within a Gateway process."""
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
|
||||
class RuntimeContentionConfig(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid", frozen=True)
|
||||
completed_run_retention_seconds: int = Field(default=300, ge=60)
|
||||
run_sweep_seconds: int = Field(default=10, ge=1)
|
||||
subagent_concurrency: int = Field(default=3, ge=1, le=64)
|
||||
subagent_per_user: int = Field(default=2, ge=1, le=64)
|
||||
background_concurrency: int = Field(default=4, ge=1, le=64)
|
||||
background_per_user: int = Field(default=2, ge=1, le=64)
|
||||
queue_limit: int = Field(default=256, ge=1, le=10000)
|
||||
|
||||
|
||||
def get_runtime_contention_config() -> RuntimeContentionConfig:
|
||||
from deerflow.config.app_config import get_app_config
|
||||
|
||||
try:
|
||||
return get_app_config().runtime_contention
|
||||
except Exception:
|
||||
return RuntimeContentionConfig()
|
||||
Reference in new issue
Block a user