pub trait WorkerPool {
// Required methods
fn process<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
txn: &'life1 mut StandardCommandTransaction,
units: UnitsOfWork,
engine: &'life2 FlowEngine,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn name(&self) -> &str;
}Expand description
Trait for different worker pool implementations
Required Methods§
Sourcefn process<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
txn: &'life1 mut StandardCommandTransaction,
units: UnitsOfWork,
engine: &'life2 FlowEngine,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn process<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
txn: &'life1 mut StandardCommandTransaction,
units: UnitsOfWork,
engine: &'life2 FlowEngine,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Process a batch of units of work grouped by flow
Each flow’s units are ordered by version and must be processed sequentially. Different flows can be processed in parallel.
§Arguments
txn- Parent transaction for creating FlowTransactionsunits- Units of work grouped by flowengine- Engine for processing flows
§Returns
Ok(()) if all units processed successfully, Err if any failed