Trait svc_scheduler::tasks::pool::RedisPool
source · 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§
Provided Methods§
sourcefn 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>>
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>>
Creates a new task and returns the task_id for it
sourcefn 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>>
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>>
Updates task information
sourcefn get_task_data<'life0, 'async_trait>(
&'life0 mut self,
task_id: i64
) -> Pin<Box<dyn Future<Output = Result<Task, CacheError>> + Send + '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>>
Gets task information