Skip to main content

Module scheduler_persistence

Module scheduler_persistence 

Source
Expand description

Durable SchedulerPersistence backend for uni-db.

Mirrors the crate::persistence::SystemLabelPersistence pattern but scoped to scheduler job state. Writes are dual-routed:

  1. JSON sidecar at <data_path>/_system/background_jobs.json — atomic write-then-rename, source-of-truth at startup (load_all). The sidecar lives next to declared_plugins.json under the same _system/ reservation.
  2. _BackgroundJob graph label (best-effort) — issued via the shared crate::persistence::LazyCypherSink once Uni::build finishes wiring it. Gives operators MATCH (j:_BackgroundJob) RETURN j visibility without needing a separate introspection procedure.

Structs§

SystemLabelSchedulerPersistence
Durable SchedulerPersistence backed by a JSON sidecar.

Functions§

scheduler_persistence_for_data_path
Choose the appropriate SchedulerPersistence for a Uni instance. Returns SystemLabelSchedulerPersistence for local-disk paths and None (caller falls back to MemoryPersistence) for remote / in-memory URIs.