feat(gateway): Add cron job provisioning
Create a mission control runner cron job via the gateway HTTP API\nand ensure it is present on startup. Adds cron helpers, job\nbuilder, and a startup hook.\n\nCo-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,7 @@ from app.api.tasks import router as tasks_router
|
||||
from app.core.config import settings
|
||||
from app.core.logging import configure_logging
|
||||
from app.db.session import init_db
|
||||
from app.services.cron_jobs import ensure_mission_control_cron_job
|
||||
|
||||
configure_logging()
|
||||
|
||||
@@ -29,8 +30,9 @@ if origins:
|
||||
|
||||
|
||||
@app.on_event("startup")
|
||||
def on_startup() -> None:
|
||||
async def on_startup() -> None:
|
||||
init_db()
|
||||
await ensure_mission_control_cron_job()
|
||||
|
||||
|
||||
@app.get("/health")
|
||||
|
||||
Reference in New Issue
Block a user