mas_storage::queue

Trait QueueScheduleRepository

source
pub trait QueueScheduleRepository: Send + Sync {
    type Error;

    // Required methods
    fn setup<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        schedules: &'life1 [&'static str],
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ScheduleStatus>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A QueueScheduleRepository is used to interact with recurrent scheduled jobs in the job queue.

Required Associated Types§

source

type Error

The error type returned by the repository.

Required Methods§

source

fn setup<'life0, 'life1, 'async_trait>( &'life0 mut self, schedules: &'life1 [&'static str], ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Setup the list of schedules in the repository

§Parameters
  • schedules - The list of schedules to setup
§Errors

Returns an error if the underlying repository fails.

source

fn list<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Vec<ScheduleStatus>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List the schedules in the repository, with the last time they were run

§Errors

Returns an error if the underlying repository fails.

Implementations on Foreign Types§

source§

impl<R> QueueScheduleRepository for Box<R>

source§

type Error = <R as QueueScheduleRepository>::Error

source§

fn setup<'life0, 'life1, 'async_trait>( &'life0 mut self, schedules: &'life1 [&'static str], ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn list<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Vec<ScheduleStatus>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§