pub struct DurableWork { /* private fields */ }Implementations§
Source§impl DurableWork
impl DurableWork
Sourcepub fn open(options: DurableWorkOptions) -> Result<DurableWork, String>
pub fn open(options: DurableWorkOptions) -> Result<DurableWork, String>
Recovers schedules, the goal and the jobs list, then starts the schedule tick.
pub fn recovered(&self) -> &Recovered
Sourcepub fn wake(&self)
pub fn wake(&self)
Re-reads the next fire time now (after the clock moved or the schedules document changed elsewhere).
Sourcepub fn close(&self)
pub fn close(&self)
Session close: stops the tick (a tick in progress finishes), stops starting goal jobs, and stops every running shell job. Durable state stays for the next open. Idempotent.
Sourcepub fn hand_over(&self)
pub fn hand_over(&self)
A successor worker takes over the session: as DurableWork::close, but running shell jobs keep running
and are left journaled as running for the successor to follow.
Trait Implementations§
Source§impl Drop for DurableWork
impl Drop for DurableWork
Auto Trait Implementations§
impl !Freeze for DurableWork
impl !RefUnwindSafe for DurableWork
impl !UnwindSafe for DurableWork
impl Forget for DurableWork
impl Move for DurableWork
impl Send for DurableWork
impl Sync for DurableWork
impl Unpin for DurableWork
impl UnsafeUnpin for DurableWork
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more