Expand description
Host-side tokio-backed scheduler driver.
Wraps the runtime-free uni_plugin::scheduler::Scheduler
primitive in a SchedulerHost that:
- calls
Scheduler::tick_ateverytick_interval, - looks up the
BackgroundJobProviderfor each due job from the host’sPluginRegistry, - dispatches each provider’s
executeontokio::task::spawn_blocking(the trait method is sync; providers that need async workHandle::current().block_on(...)inside), - reports lifecycle transitions to the configured
SchedulerPersistencebackend, and - drains all in-flight runs on shutdown via the supplied
ShutdownHandlebroadcast.
Per the M11 plan, the durable backend (writes through
uni_system.background_jobs via the write-enabled
execute_inner_query) lives downstream in uni-query; this module
consumes only the SchedulerPersistence trait.
Structs§
- Scheduler
Host - Host-side scheduler driver.
- Scheduler
JobHost - Concrete
JobHostimplementation that lets built-in background jobs reach the storage manager and (afterUni::buildfinishes) the hostUniInnerfor write-mode Cypher execution.
Constants§
- DEFAULT_
TICK_ INTERVAL - Default driver tick interval — chosen to match the existing
DeferralQueueticker so the two background drivers cohabit on the same cadence.
Functions§
- spawn_
with_ memory_ persistence - Convenience constructor returning a
SchedulerHostbacked by an in-memory persistence — used by the defaultUni::buildpath before the host wires a durable backend.