rebuild(runtime): govern market operations and job truth

This commit is contained in:
leefer
2026-07-30 10:14:29 +08:00
parent 4fc8691eee
commit d8f0dd930c
39 changed files with 2224 additions and 79 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ from backend.http.errors import install_error_handlers
from backend.http.request_context import install_request_context
from backend.http.router import api_router
from backend.http.security import install_security_headers
from backend.jobs.screener import run_screener_scheduler
from backend.jobs.operations import run_operations_scheduler
logger = logging.getLogger(__name__)
@@ -41,7 +41,7 @@ def create_application(settings: Settings | None = None) -> FastAPI:
stop = asyncio.Event()
task = None
if runtime.environment != "test":
task = asyncio.create_task(run_screener_scheduler(container.screener, stop))
task = asyncio.create_task(run_operations_scheduler(container.operations, stop))
try:
yield
finally: