pub struct InMemoryJobQueue { /* private fields */ }Expand description
In-memory implementation of the generic job queue backend.
This backend is process-local. It is intentionally useful for development, tests, embedded runtimes, and as a reference implementation for Redis, Postgres, or NATS-backed implementations.
Implementations§
Source§impl InMemoryJobQueue
impl InMemoryJobQueue
Sourcepub fn from_snapshot(snapshot: JobQueueSnapshot) -> Self
pub fn from_snapshot(snapshot: JobQueueSnapshot) -> Self
Restore an in-memory queue from a durable snapshot.
Sourcepub fn queue_name(&self) -> &str
pub fn queue_name(&self) -> &str
Queue name.
Sourcepub async fn snapshot(&self) -> JobQueueSnapshot
pub async fn snapshot(&self) -> JobQueueSnapshot
Capture the current queue state for durable storage.
Sourcepub async fn add(
&self,
name: impl Into<String>,
payload: Value,
options: JobOptions,
) -> Result<Job>
pub async fn add( &self, name: impl Into<String>, payload: Value, options: JobOptions, ) -> Result<Job>
Add a job using the current wall-clock time.
Sourcepub async fn add_at(
&self,
name: impl Into<String>,
payload: Value,
options: JobOptions,
now: DateTime<Utc>,
) -> Result<Job>
pub async fn add_at( &self, name: impl Into<String>, payload: Value, options: JobOptions, now: DateTime<Utc>, ) -> Result<Job>
Add a job at an explicit timestamp. Primarily useful for deterministic tests.
Sourcepub async fn add_many(&self, jobs: Vec<JobSpec>) -> Result<Vec<Job>>
pub async fn add_many(&self, jobs: Vec<JobSpec>) -> Result<Vec<Job>>
Add multiple jobs using the current wall-clock time.
Sourcepub async fn add_many_at(
&self,
jobs: Vec<JobSpec>,
now: DateTime<Utc>,
) -> Result<Vec<Job>>
pub async fn add_many_at( &self, jobs: Vec<JobSpec>, now: DateTime<Utc>, ) -> Result<Vec<Job>>
Add multiple jobs at an explicit timestamp.
Sourcepub async fn add_flow(
&self,
parent: JobSpec,
children: Vec<JobSpec>,
) -> Result<JobFlow>
pub async fn add_flow( &self, parent: JobSpec, children: Vec<JobSpec>, ) -> Result<JobFlow>
Add a parent-child flow. The parent remains blocked until every child is completed, removed, or released by a terminal failure policy.
Sourcepub async fn add_flow_at(
&self,
parent: JobSpec,
children: Vec<JobSpec>,
now: DateTime<Utc>,
) -> Result<JobFlow>
pub async fn add_flow_at( &self, parent: JobSpec, children: Vec<JobSpec>, now: DateTime<Utc>, ) -> Result<JobFlow>
Add a parent-child flow at an explicit timestamp.
Sourcepub async fn add_flow_children(
&self,
parent_id: &str,
lock_token: &str,
children: Vec<JobSpec>,
) -> Result<Vec<Job>>
pub async fn add_flow_children( &self, parent_id: &str, lock_token: &str, children: Vec<JobSpec>, ) -> Result<Vec<Job>>
Add children to an active flow parent using the current wall-clock time.
Sourcepub async fn add_flow_children_at(
&self,
parent_id: &str,
lock_token: &str,
children: Vec<JobSpec>,
now: DateTime<Utc>,
) -> Result<Vec<Job>>
pub async fn add_flow_children_at( &self, parent_id: &str, lock_token: &str, children: Vec<JobSpec>, now: DateTime<Utc>, ) -> Result<Vec<Job>>
Add children to an active flow parent and move the parent to waiting-children.
Sourcepub async fn get_flow_dependencies(
&self,
parent_id: &str,
) -> Result<Option<JobFlowDependencies>>
pub async fn get_flow_dependencies( &self, parent_id: &str, ) -> Result<Option<JobFlowDependencies>>
Return a parent flow’s current child dependency snapshot.
Sourcepub async fn get_flow_dependency_counts(
&self,
parent_id: &str,
) -> Result<Option<JobFlowDependencyCounts>>
pub async fn get_flow_dependency_counts( &self, parent_id: &str, ) -> Result<Option<JobFlowDependencyCounts>>
Return dependency counts for a flow parent.
Sourcepub async fn get_flow_dependency_selected_counts(
&self,
parent_id: &str,
options: JobFlowDependencyCountOptions,
) -> Result<Option<JobFlowDependencySelectedCounts>>
pub async fn get_flow_dependency_selected_counts( &self, parent_id: &str, options: JobFlowDependencyCountOptions, ) -> Result<Option<JobFlowDependencySelectedCounts>>
Return selected BullMQ-style dependency counts for a flow parent.
Sourcepub async fn get_flow_dependency_values(
&self,
parent_id: &str,
) -> Result<Option<JobFlowDependencyValues>>
pub async fn get_flow_dependency_values( &self, parent_id: &str, ) -> Result<Option<JobFlowDependencyValues>>
Return BullMQ-style full dependency buckets for a flow parent.
Sourcepub async fn get_flow_dependency_page(
&self,
parent_id: &str,
options: JobFlowDependencyPageOptions,
) -> Result<Option<JobFlowDependencyPage>>
pub async fn get_flow_dependency_page( &self, parent_id: &str, options: JobFlowDependencyPageOptions, ) -> Result<Option<JobFlowDependencyPage>>
Return one cursor page from a parent flow dependency bucket.
Sourcepub async fn get_flow_dependency_pages(
&self,
parent_id: &str,
options: JobFlowDependencyPagesOptions,
) -> Result<Option<JobFlowDependencyPages>>
pub async fn get_flow_dependency_pages( &self, parent_id: &str, options: JobFlowDependencyPagesOptions, ) -> Result<Option<JobFlowDependencyPages>>
Return cursor pages from several parent flow dependency buckets.
Sourcepub async fn get_flow_children_values(
&self,
parent_id: &str,
) -> Result<Option<JobFlowChildValues>>
pub async fn get_flow_children_values( &self, parent_id: &str, ) -> Result<Option<JobFlowChildValues>>
Return completed child result values for a flow parent.
Sourcepub async fn get_flow_ignored_children_failures(
&self,
parent_id: &str,
) -> Result<Option<JobFlowIgnoredFailures>>
pub async fn get_flow_ignored_children_failures( &self, parent_id: &str, ) -> Result<Option<JobFlowIgnoredFailures>>
Return ignored child failure reasons for a flow parent.
Sourcepub async fn remove_unprocessed_children(
&self,
parent_id: &str,
now: DateTime<Utc>,
) -> Result<Option<Vec<Job>>>
pub async fn remove_unprocessed_children( &self, parent_id: &str, now: DateTime<Utc>, ) -> Result<Option<Vec<Job>>>
Remove children that are still unprocessed and not active.
Sourcepub async fn remove_child_dependency(
&self,
child_id: &str,
now: DateTime<Utc>,
) -> Result<bool>
pub async fn remove_child_dependency( &self, child_id: &str, now: DateTime<Utc>, ) -> Result<bool>
Remove a single child from its parent dependency list without deleting the child job.
Sourcepub async fn get_state(&self, job_id: &str) -> Result<Option<JobState>>
pub async fn get_state(&self, job_id: &str) -> Result<Option<JobState>>
Return the current state for a job id.
Sourcepub async fn get_finished_result(
&self,
job_id: &str,
) -> Result<Option<JobFinishedResult>>
pub async fn get_finished_result( &self, job_id: &str, ) -> Result<Option<JobFinishedResult>>
Return finished status and retained terminal payload for a job.
Sourcepub async fn remove_deduplication_key(
&self,
deduplication_id: &str,
) -> Result<bool>
pub async fn remove_deduplication_key( &self, deduplication_id: &str, ) -> Result<bool>
Remove the active deduplication owner key, allowing a new owner to be added.
Sourcepub async fn get_deduplication_job_id(
&self,
deduplication_id: &str,
) -> Result<Option<JobId>>
pub async fn get_deduplication_job_id( &self, deduplication_id: &str, ) -> Result<Option<JobId>>
Return the current active job id for a deduplication id.
Sourcepub async fn list_repeats(&self) -> Result<Vec<JobRepeatEntry>>
pub async fn list_repeats(&self) -> Result<Vec<JobRepeatEntry>>
List current non-terminal repeat series owners.
Sourcepub async fn get_repeat(
&self,
repeat_key: &str,
) -> Result<Option<JobRepeatEntry>>
pub async fn get_repeat( &self, repeat_key: &str, ) -> Result<Option<JobRepeatEntry>>
Return one repeat series / job scheduler by key.
Sourcepub async fn count_repeats(&self) -> Result<usize>
pub async fn count_repeats(&self) -> Result<usize>
Return the number of current repeat series / job schedulers.
Sourcepub async fn list_repeats_page(
&self,
options: JobRepeatListOptions,
) -> Result<JobRepeatPage>
pub async fn list_repeats_page( &self, options: JobRepeatListOptions, ) -> Result<JobRepeatPage>
Return repeat series / job schedulers ordered by next scheduled time.
Sourcepub async fn upsert_repeat(
&self,
spec: JobSpec,
now: DateTime<Utc>,
) -> Result<Job>
pub async fn upsert_repeat( &self, spec: JobSpec, now: DateTime<Utc>, ) -> Result<Job>
Create or replace the current non-active occurrence for a repeat series.
Sourcepub async fn remove_repeat(&self, repeat_key: &str) -> Result<Option<Job>>
pub async fn remove_repeat(&self, repeat_key: &str) -> Result<Option<Job>>
Remove the current non-terminal occurrence for a repeat series.
Sourcepub async fn promote(&self, job_id: &str, now: DateTime<Utc>) -> Result<Job>
pub async fn promote(&self, job_id: &str, now: DateTime<Utc>) -> Result<Job>
Promote a single delayed job to waiting.
Sourcepub async fn reschedule(
&self,
job_id: &str,
delay: Duration,
now: DateTime<Utc>,
) -> Result<Job>
pub async fn reschedule( &self, job_id: &str, delay: Duration, now: DateTime<Utc>, ) -> Result<Job>
Reschedule a delayed job relative to now.
Sourcepub async fn retry(&self, job_id: &str, now: DateTime<Utc>) -> Result<Job>
pub async fn retry(&self, job_id: &str, now: DateTime<Utc>) -> Result<Job>
Manually retry a failed job by moving it back to the waiting state.
Sourcepub async fn renew(
&self,
job_id: &str,
lock_token: &str,
lease_for: Duration,
now: DateTime<Utc>,
) -> Result<Job>
pub async fn renew( &self, job_id: &str, lock_token: &str, lease_for: Duration, now: DateTime<Utc>, ) -> Result<Job>
Renew the active worker lease for a job.
Sourcepub async fn delay_active(
&self,
job_id: &str,
lock_token: &str,
delay: Duration,
now: DateTime<Utc>,
) -> Result<Job>
pub async fn delay_active( &self, job_id: &str, lock_token: &str, delay: Duration, now: DateTime<Utc>, ) -> Result<Job>
Move an active leased job back to delayed state.
Sourcepub async fn release_active(
&self,
job_id: &str,
lock_token: &str,
now: DateTime<Utc>,
) -> Result<Job>
pub async fn release_active( &self, job_id: &str, lock_token: &str, now: DateTime<Utc>, ) -> Result<Job>
Release an active leased job back to waiting state.
Sourcepub async fn set_priority(
&self,
job_id: &str,
priority: JobPriority,
) -> Result<Job>
pub async fn set_priority( &self, job_id: &str, priority: JobPriority, ) -> Result<Job>
Update an existing job priority.
Sourcepub async fn set_priority_with_lifo(
&self,
job_id: &str,
priority: JobPriority,
lifo: bool,
) -> Result<Job>
pub async fn set_priority_with_lifo( &self, job_id: &str, priority: JobPriority, lifo: bool, ) -> Result<Job>
Update an existing job priority and waiting reinsert order.
Sourcepub async fn list(&self, options: JobListOptions) -> Result<JobListPage>
pub async fn list(&self, options: JobListOptions) -> Result<JobListPage>
List jobs with deterministic pagination.
Sourcepub async fn counts_by_state(
&self,
states: &[JobState],
) -> Result<Vec<JobStateCount>>
pub async fn counts_by_state( &self, states: &[JobState], ) -> Result<Vec<JobStateCount>>
Count jobs for requested lifecycle states.
Sourcepub async fn counts_per_priority(
&self,
priorities: &[JobPriority],
) -> Result<Vec<JobPriorityCount>>
pub async fn counts_per_priority( &self, priorities: &[JobPriority], ) -> Result<Vec<JobPriorityCount>>
Count waiting jobs for each requested priority.
Sourcepub async fn clean(
&self,
state: JobState,
grace: Duration,
limit: usize,
now: DateTime<Utc>,
) -> Result<Vec<Job>>
pub async fn clean( &self, state: JobState, grace: Duration, limit: usize, now: DateTime<Utc>, ) -> Result<Vec<Job>>
Remove old jobs in a specific state and return their snapshots.
Sourcepub async fn drain(&self, include_delayed: bool) -> Result<Vec<Job>>
pub async fn drain(&self, include_delayed: bool) -> Result<Vec<Job>>
Drain waiting jobs and optionally non-repeat delayed jobs.
Sourcepub async fn obliterate(&self, force: bool) -> Result<usize>
pub async fn obliterate(&self, force: bool) -> Result<usize>
Remove every job and queue-owned metadata entry.
Sourcepub async fn set_data(&self, job_id: &str, payload: Value) -> Result<Job>
pub async fn set_data(&self, job_id: &str, payload: Value) -> Result<Job>
Update the stored payload for an existing job.
Sourcepub async fn set_progress(&self, job_id: &str, progress: Value) -> Result<Job>
pub async fn set_progress(&self, job_id: &str, progress: Value) -> Result<Job>
Update progress for an existing job.
Sourcepub async fn save_stacktrace(
&self,
job_id: &str,
stacktrace: Vec<String>,
failed_reason: String,
) -> Result<Job>
pub async fn save_stacktrace( &self, job_id: &str, stacktrace: Vec<String>, failed_reason: String, ) -> Result<Job>
Save retained failure diagnostics for a job.
Sourcepub async fn log(
&self,
job_id: &str,
line: String,
keep: usize,
now: DateTime<Utc>,
) -> Result<Job>
pub async fn log( &self, job_id: &str, line: String, keep: usize, now: DateTime<Utc>, ) -> Result<Job>
Append a log line. keep == 0 retains all log lines.
Sourcepub async fn get_logs(
&self,
job_id: &str,
start: isize,
end: isize,
ascending: bool,
) -> Result<JobLogPage>
pub async fn get_logs( &self, job_id: &str, start: isize, end: isize, ascending: bool, ) -> Result<JobLogPage>
Return retained log entries for a job.
Sourcepub async fn clear_logs(&self, job_id: &str, keep: usize) -> Result<JobLogPage>
pub async fn clear_logs(&self, job_id: &str, keep: usize) -> Result<JobLogPage>
Clear retained log entries for a job. keep == 0 clears all logs.
Trait Implementations§
Source§impl Clone for InMemoryJobQueue
impl Clone for InMemoryJobQueue
Source§fn clone(&self) -> InMemoryJobQueue
fn clone(&self) -> InMemoryJobQueue
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InMemoryJobQueue
impl Debug for InMemoryJobQueue
Source§impl JobQueueBackend for InMemoryJobQueue
impl JobQueueBackend for InMemoryJobQueue
fn add_job<'life0, 'async_trait>(
&'life0 self,
name: String,
payload: Value,
options: JobOptions,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn add_jobs<'life0, 'async_trait>(
&'life0 self,
jobs: Vec<JobSpec>,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Job>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add_jobs<'life0, 'async_trait>(
&'life0 self,
jobs: Vec<JobSpec>,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Job>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
add_job idempotency semantics.fn add_flow<'life0, 'async_trait>(
&'life0 self,
parent: JobSpec,
children: Vec<JobSpec>,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<JobFlow>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn add_flow_children<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
parent_id: &'life1 str,
lock_token: &'life2 str,
children: Vec<JobSpec>,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Job>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_flow_children<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
parent_id: &'life1 str,
lock_token: &'life2 str,
children: Vec<JobSpec>,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Job>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
waiting_children. Read morefn get_flow_dependencies<'life0, 'life1, 'async_trait>(
&'life0 self,
parent_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<JobFlowDependencies>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_flow_dependency_counts<'life0, 'life1, 'async_trait>(
&'life0 self,
parent_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<JobFlowDependencyCounts>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_flow_dependency_selected_counts<'life0, 'life1, 'async_trait>(
&'life0 self,
parent_id: &'life1 str,
options: JobFlowDependencyCountOptions,
) -> Pin<Box<dyn Future<Output = Result<Option<JobFlowDependencySelectedCounts>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_flow_dependency_selected_counts<'life0, 'life1, 'async_trait>(
&'life0 self,
parent_id: &'life1 str,
options: JobFlowDependencyCountOptions,
) -> Pin<Box<dyn Future<Output = Result<Option<JobFlowDependencySelectedCounts>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_flow_dependency_values<'life0, 'life1, 'async_trait>(
&'life0 self,
parent_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<JobFlowDependencyValues>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_flow_dependency_values<'life0, 'life1, 'async_trait>(
&'life0 self,
parent_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<JobFlowDependencyValues>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_flow_dependency_page<'life0, 'life1, 'async_trait>(
&'life0 self,
parent_id: &'life1 str,
options: JobFlowDependencyPageOptions,
) -> Pin<Box<dyn Future<Output = Result<Option<JobFlowDependencyPage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_flow_dependency_page<'life0, 'life1, 'async_trait>(
&'life0 self,
parent_id: &'life1 str,
options: JobFlowDependencyPageOptions,
) -> Pin<Box<dyn Future<Output = Result<Option<JobFlowDependencyPage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_flow_dependency_pages<'life0, 'life1, 'async_trait>(
&'life0 self,
parent_id: &'life1 str,
options: JobFlowDependencyPagesOptions,
) -> Pin<Box<dyn Future<Output = Result<Option<JobFlowDependencyPages>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_flow_dependency_pages<'life0, 'life1, 'async_trait>(
&'life0 self,
parent_id: &'life1 str,
options: JobFlowDependencyPagesOptions,
) -> Pin<Box<dyn Future<Output = Result<Option<JobFlowDependencyPages>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_flow_children_values<'life0, 'life1, 'async_trait>(
&'life0 self,
parent_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<JobFlowChildValues>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_flow_children_values<'life0, 'life1, 'async_trait>(
&'life0 self,
parent_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<JobFlowChildValues>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_flow_ignored_children_failures<'life0, 'life1, 'async_trait>(
&'life0 self,
parent_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<JobFlowIgnoredFailures>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_flow_ignored_children_failures<'life0, 'life1, 'async_trait>(
&'life0 self,
parent_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<JobFlowIgnoredFailures>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_unprocessed_children<'life0, 'life1, 'async_trait>(
&'life0 self,
parent_id: &'life1 str,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Job>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_child_dependency<'life0, 'life1, 'async_trait>(
&'life0 self,
child_id: &'life1 str,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn claim_next<'life0, 'async_trait>(
&'life0 self,
worker_id: JobWorkerId,
lease_for: Duration,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Option<Job>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn complete_job<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
lock_token: &'life2 str,
value: Value,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fail_job<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
lock_token: &'life2 str,
error: String,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn fail_job_discarding_retry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
lock_token: &'life2 str,
error: String,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fail_job_discarding_retry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
lock_token: &'life2 str,
error: String,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn renew_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
lock_token: &'life2 str,
lease_for: Duration,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delay_active_job<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
lock_token: &'life2 str,
delay: Duration,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn release_active_job<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
lock_token: &'life2 str,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn promote_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn reschedule_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
delay: Duration,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn retry_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn retry_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn update_priority<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
priority: JobPriority,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_priority<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
priority: JobPriority,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn update_priority_with_lifo<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
priority: JobPriority,
lifo: bool,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_priority_with_lifo<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
priority: JobPriority,
lifo: bool,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Job>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_repeat<'life0, 'life1, 'async_trait>(
&'life0 self,
repeat_key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Job>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_deduplication_key<'life0, 'life1, 'async_trait>(
&'life0 self,
deduplication_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_deduplication_job_id<'life0, 'life1, 'async_trait>(
&'life0 self,
deduplication_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<JobId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_repeats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobRepeatEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn upsert_repeat<'life0, 'async_trait>(
&'life0 self,
spec: JobSpec,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upsert_repeat<'life0, 'async_trait>(
&'life0 self,
spec: JobSpec,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clean_jobs<'life0, 'async_trait>(
&'life0 self,
state: JobState,
grace: Duration,
limit: usize,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Job>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn drain_jobs<'life0, 'async_trait>(
&'life0 self,
include_delayed: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<Job>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn obliterate<'life0, 'async_trait>(
&'life0 self,
force: bool,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn obliterate<'life0, 'async_trait>(
&'life0 self,
force: bool,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_jobs<'life0, 'async_trait>(
&'life0 self,
options: JobListOptions,
) -> Pin<Box<dyn Future<Output = Result<JobListPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_job_counts<'life0, 'life1, 'async_trait>(
&'life0 self,
states: &'life1 [JobState],
) -> Pin<Box<dyn Future<Output = Result<Vec<JobStateCount>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_job_counts<'life0, 'life1, 'async_trait>(
&'life0 self,
states: &'life1 [JobState],
) -> Pin<Box<dyn Future<Output = Result<Vec<JobStateCount>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_counts_per_priority<'life0, 'life1, 'async_trait>(
&'life0 self,
priorities: &'life1 [JobPriority],
) -> Pin<Box<dyn Future<Output = Result<Vec<JobPriorityCount>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_counts_per_priority<'life0, 'life1, 'async_trait>(
&'life0 self,
priorities: &'life1 [JobPriority],
) -> Pin<Box<dyn Future<Output = Result<Vec<JobPriorityCount>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_data<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
payload: Value,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn update_progress<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
progress: Value,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_progress<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
progress: Value,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn save_stacktrace<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
stacktrace: Vec<String>,
failed_reason: String,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_stacktrace<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
stacktrace: Vec<String>,
failed_reason: String,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_log<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
line: String,
keep: usize,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Job>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_job_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
start: isize,
end: isize,
ascending: bool,
) -> Pin<Box<dyn Future<Output = Result<JobLogPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn clear_job_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
keep: usize,
) -> Pin<Box<dyn Future<Output = Result<JobLogPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn clear_job_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
keep: usize,
) -> Pin<Box<dyn Future<Output = Result<JobLogPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn read_events<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
start: &'life1 str,
end: &'life2 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn read_events<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
start: &'life1 str,
end: &'life2 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn trim_events<'life0, 'async_trait>(
&'life0 self,
max_len: usize,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn trim_events<'life0, 'async_trait>(
&'life0 self,
max_len: usize,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
max_len entries.