pub trait RedisPool {
    // Required method
    fn pool(&self) -> &Pool;

    // Provided methods
    fn new_task<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        task: &'life1 Task,
        priority: FlightPriority,
        expiry: DateTime<Utc>
    ) -> Pin<Box<dyn Future<Output = Result<i64, CacheError>> + Send + 'async_trait>>
       where Self: Send + Sync + 'async_trait + Send,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn update_task<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        task_id: i64,
        task: &'life1 Task,
        expiry: DateTime<Utc>
    ) -> Pin<Box<dyn Future<Output = Result<(), CacheError>> + Send + 'async_trait>>
       where Self: Send + Sync + 'async_trait + Send,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn get_task_data<'life0, 'async_trait>(
        &'life0 mut self,
        task_id: i64
    ) -> Pin<Box<dyn Future<Output = Result<Task, CacheError>> + Send + 'async_trait>>
       where Self: Send + Sync + 'async_trait + Send,
             'life0: 'async_trait { ... }
    fn next_task<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<(i64, Task), CacheError>> + Send + 'async_trait>>
       where Self: Send + Sync + 'async_trait + Send,
             'life0: 'async_trait { ... }
}
Expand description

Trait for interacting with a scheduler task pool

Required Methods§

source

fn pool(&self) -> &Pool

Returns a reference to the underlying pool.

Provided Methods§

source

fn new_task<'life0, 'life1, 'async_trait>( &'life0 mut self, task: &'life1 Task, priority: FlightPriority, expiry: DateTime<Utc> ) -> Pin<Box<dyn Future<Output = Result<i64, CacheError>> + Send + 'async_trait>>
where Self: Send + Sync + 'async_trait + Send, 'life0: 'async_trait, 'life1: 'async_trait,

Creates a new task and returns the task_id for it

source

fn update_task<'life0, 'life1, 'async_trait>( &'life0 mut self, task_id: i64, task: &'life1 Task, expiry: DateTime<Utc> ) -> Pin<Box<dyn Future<Output = Result<(), CacheError>> + Send + 'async_trait>>
where Self: Send + Sync + 'async_trait + Send, 'life0: 'async_trait, 'life1: 'async_trait,

Updates task information

source

fn get_task_data<'life0, 'async_trait>( &'life0 mut self, task_id: i64 ) -> Pin<Box<dyn Future<Output = Result<Task, CacheError>> + Send + 'async_trait>>
where Self: Send + Sync + 'async_trait + Send, 'life0: 'async_trait,

Gets task information

source

fn next_task<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<(i64, Task), CacheError>> + Send + 'async_trait>>
where Self: Send + Sync + 'async_trait + Send, 'life0: 'async_trait,

Updates task information

Implementors§