fix: bound task failures and release stalled workers

This commit is contained in:
chenmingxuan committed 2026-10-08 16:10:10 +08:00
1 parent 606ed94160
commit 1fdf7c0d1d
32 files changed
+1121 -93

No files matched your search

+3 -2
View File
@@ -12,6 +12,7 @@ from apps.admin_console.services.automation_store import identifier, store
from apps.admin_console.services import automation_service as service
from apps.admin_console.services import batch_archive as archive_service
from apps.admin_console.services import report_export, task_import
from artemis.config.settings import settings
router = APIRouter(prefix="/api/automation", tags=["automation"])
@@ -30,7 +31,7 @@ class BatchRequest(ReportPreferences):
profile: Literal["flash", "pro"] = "flash"
stop_on_failure: bool = False
timeout_seconds: int = Field(
default_factory=lambda: int(os.getenv("ARTEMIS_BATCH_TASK_TIMEOUT", "1800")),
default_factory=lambda: settings.ARTEMIS_TASK_TIMEOUT_SECONDS,
ge=30,
le=86400,
)
@@ -50,7 +51,7 @@ def require(kind, key):
def preferences():
return {
**store.preferences(),
"batch_timeout_seconds": int(os.getenv("ARTEMIS_BATCH_TASK_TIMEOUT", "1800")),
"batch_timeout_seconds": settings.ARTEMIS_TASK_TIMEOUT_SECONDS,
}