store
diapason.scheduler.store
¶
SQLite-backed persistence for scheduled tasks and run logs.
SchedulerStore
¶
SQLite CRUD store for scheduled tasks and their run logs.
close()
¶
Close the underlying SQLite connection.
delete_task(task_id)
¶
Delete a task by ID.
get_due_tasks(now_iso)
¶
Return active tasks whose next_run is at or before now_iso.
get_run_logs(task_id, limit=10)
¶
Return the most recent run logs for task_id.
get_task(task_id)
¶
Retrieve a single task by ID, or None if not found.
list_tasks(status=None)
¶
Return all tasks, optionally filtered by status.
log_run(task_id, started_at, finished_at, success, result='', error='')
¶
Record a single execution of a task.
save_task(task)
¶
Insert or replace a scheduled task record.
update_task(task)
¶
Update an existing task (same as save_task — uses INSERT OR REPLACE).