pub trait WorkQueue: Send + Sync {
// Required methods
fn claim_due<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
spec_ids: &'life1 [String],
worker_id: &'life2 str,
lease_secs: i64,
batch: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkItem>, SupervisorError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn renew<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
worker_id: &'life3 str,
lease_version: i64,
lease_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<(), SupervisorError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn commit_command<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
item: &'life1 WorkItem,
command: &'life2 WorkflowTransitionCommand,
) -> Pin<Box<dyn Future<Output = Result<(), SupervisorError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Durable queue the supervisor claims from and commits to.
Required Methods§
Sourcefn claim_due<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
spec_ids: &'life1 [String],
worker_id: &'life2 str,
lease_secs: i64,
batch: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkItem>, SupervisorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn claim_due<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
spec_ids: &'life1 [String],
worker_id: &'life2 str,
lease_secs: i64,
batch: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkItem>, SupervisorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Claim due instances for spec_ids.
Sourcefn renew<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
worker_id: &'life3 str,
lease_version: i64,
lease_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<(), SupervisorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn renew<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
id: &'life2 str,
worker_id: &'life3 str,
lease_version: i64,
lease_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<(), SupervisorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Renew a claim’s lease.
Sourcefn commit_command<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
item: &'life1 WorkItem,
command: &'life2 WorkflowTransitionCommand,
) -> Pin<Box<dyn Future<Output = Result<(), SupervisorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn commit_command<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
item: &'life1 WorkItem,
command: &'life2 WorkflowTransitionCommand,
) -> Pin<Box<dyn Future<Output = Result<(), SupervisorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Commit a driver command atomically.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".