pub struct SqliteJobRepository { /* private fields */ }Implementations§
Source§impl SqliteJobRepository
impl SqliteJobRepository
pub fn new(pool: SqlitePool) -> Self
Trait Implementations§
Source§impl Clone for SqliteJobRepository
impl Clone for SqliteJobRepository
Source§impl JobQueue for SqliteJobRepository
impl JobQueue for SqliteJobRepository
fn enqueue<'life0, 'async_trait>(
&'life0 self,
input: NewJob,
) -> Pin<Box<dyn Future<Output = Result<EnqueueOutcome, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn append_log<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
job_id: JobId,
attempt_no: Option<i32>,
level: &'life1 str,
message: &'life2 str,
fields: Value,
) -> Pin<Box<dyn Future<Output = Result<JobLogRecord, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_logs<'life0, 'async_trait>(
&'life0 self,
id: JobId,
after_id: Option<i64>,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobLogRecord>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dequeue<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queues: &'life1 [String],
worker_id: &'life2 str,
lease: Duration,
) -> Pin<Box<dyn Future<Output = Result<Option<SbolJob>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn renew_lease<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: JobId,
worker_id: &'life1 str,
lease: Duration,
) -> Pin<Box<dyn Future<Output = Result<bool, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn mark_succeeded<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: JobId,
worker_id: &'life1 str,
result: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn mark_failed<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
job_id: JobId,
worker_id: &'life1 str,
error: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<JobStatus, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn reap_expired_leases<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 self,
id: JobId,
) -> Pin<Box<dyn Future<Output = Result<Option<SbolJob>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_attempts<'life0, 'async_trait>(
&'life0 self,
id: JobId,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobAttempt>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 ListJobsFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<SbolJob>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cancel<'life0, 'async_trait>(
&'life0 self,
id: JobId,
) -> Pin<Box<dyn Future<Output = Result<bool, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn current_status<'life0, 'async_trait>(
&'life0 self,
id: JobId,
) -> Pin<Box<dyn Future<Output = Result<Option<JobStatus>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn queue_depth_snapshot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<QueueDepthRow>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn oldest_queued_age<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<OldestQueuedAge>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn recent_failure_count<'life0, 'async_trait>(
&'life0 self,
within_hours: i64,
) -> Pin<Box<dyn Future<Output = Result<i64, DomainError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn recent_failure_count<'life0, 'async_trait>(
&'life0 self,
within_hours: i64,
) -> Pin<Box<dyn Future<Output = Result<i64, DomainError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Count jobs that reached a terminal failure (
failed or dead) in the
last within_hours. Backed by Self::list so every backend reports
the same number without backend-specific SQL; the dashboard’s
failures tile reads it.Auto Trait Implementations§
impl !RefUnwindSafe for SqliteJobRepository
impl !UnwindSafe for SqliteJobRepository
impl Freeze for SqliteJobRepository
impl Send for SqliteJobRepository
impl Sync for SqliteJobRepository
impl Unpin for SqliteJobRepository
impl UnsafeUnpin for SqliteJobRepository
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more