pub struct BackgroundJobServerPublisher { /* private fields */ }Implementations§
Source§impl BackgroundJobServerPublisher
impl BackgroundJobServerPublisher
pub async fn new( id: String, mq_client: Arc<Box<dyn MqClient>>, storage: Box<dyn Storage>, ) -> Result<Self>
Sourcepub async fn ensure_worker_ready(&self) -> Result<()>
pub async fn ensure_worker_ready(&self) -> Result<()>
Blocks until there is at least worker available. This is used during startup to ensure readiness.
pub fn get_metrics(&self) -> Result<String>
pub async fn enqueue_continue( &self, parent_job_id: JobId, message: impl JobParameter, ) -> Result<JobId>
pub async fn enqueue_delayed( &self, message: impl JobParameter, delay: Duration, ) -> Result<JobId>
pub async fn enqueue_delayed_at( &self, message: impl JobParameter, time: DateTime<Utc>, ) -> Result<JobId>
pub async fn enqueue(&self, message: impl JobParameter) -> Result<JobId>
pub async fn enqueue_recurring( &self, identifier: String, message: impl JobParameter, cron: String, ) -> Result<JobId>
Auto Trait Implementations§
impl Freeze for BackgroundJobServerPublisher
impl !RefUnwindSafe for BackgroundJobServerPublisher
impl Send for BackgroundJobServerPublisher
impl Sync for BackgroundJobServerPublisher
impl Unpin for BackgroundJobServerPublisher
impl !UnwindSafe for BackgroundJobServerPublisher
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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