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§
Required Methods§
sourcefn 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 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,
sourcefn 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,
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.