feat(work): add signed task progress and durable status cards

This commit is contained in:
ex_tianzy
2026-11-12 15:18:21 +08:00
parent 2e0d5987c0
commit abe2550dd0
11 changed files with 439 additions and 2 deletions
+2
View File
@@ -41,6 +41,7 @@ class Settings(BaseSettings):
max_connections: int = 1000
max_result: int = 16000
work_files_enabled: bool = False
work_task_cards_enabled: bool = False
work_file_max_bytes: int = 10*1024*1024
work_file_batch_limit: int = 20
work_file_retention: int = 86400
@@ -56,6 +57,7 @@ class Settings(BaseSettings):
@model_validator(mode="after")
def validate_runtime(self):
if self.work_task_cards_enabled and self.credential_mode!='broker':raise ValueError('task cards require broker mode')
if not 1024<=self.work_file_max_bytes<=100*1024*1024 or not 1<=self.work_file_batch_limit<=50 or not 300<=self.work_file_retention<=7*86400:
raise ValueError('invalid work file deployment limits')
if self.work_files_enabled and self.credential_mode!='broker':raise ValueError('work files require broker mode')