feat: add CronJob and CronJobRun models with bulk upsert API and admin
- CronJob: maps jobs.json (schedule, payload, delivery, state fields) - CronJobRun: stores runs/*.jsonl per-job execution history with usage/tokens - cron_bulk_upsert service: atomic upsert with GET_OR_CREATE for idempotency - POST /api/cron/bulk_upsert/ endpoint - Django Admin: CronJobAdmin with CronJobRunInline, CronJobRunAdmin - sync_sessions.py --cron mode: SSH read jobs.json + runs/*.jsonl, incremental sync - 0003_cronjob_cronjobrun migration
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
from django.urls import path
|
||||
from openclaw.views import sessions_bulk_upsert
|
||||
from openclaw.cron_views import cron_bulk_upsert
|
||||
|
||||
urlpatterns = [
|
||||
path("sessions/bulk_upsert/", sessions_bulk_upsert, name="sessions_bulk_upsert"),
|
||||
path("cron/bulk_upsert/", cron_bulk_upsert, name="cron_bulk_upsert"),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user