refactor: own cross-thread background tasks

This commit is contained in:
jxxghp
2026-08-24 05:33:50 +08:00
parent 4575146acd
commit d694cd081c
9 changed files with 188 additions and 14 deletions
+3 -1
View File
@@ -8,7 +8,9 @@ from pathlib import Path
PROJECT_ROOT = Path(__file__).resolve().parents[2]
TASK_METHODS = frozenset({"create", "create_sync", "register"})
TASK_METHODS = frozenset(
{"create", "create_sync", "register", "submit_threadsafe"}
)
TASK_MODULE = "app.runtime.tasks"
CONTEXT_MODULE = "app.api.context"
TASK_FACTORIES = frozenset(