pub struct BackgroundJobServer { /* private fields */ }
Expand description
Background job server that manages job processing
Implementations§
Source§impl BackgroundJobServer
impl BackgroundJobServer
Sourcepub fn new(
config: ServerConfig,
storage: Arc<dyn Storage>,
worker_registry: Arc<WorkerRegistry>,
) -> Self
pub fn new( config: ServerConfig, storage: Arc<dyn Storage>, worker_registry: Arc<WorkerRegistry>, ) -> Self
Create a new background job server
Sourcepub fn with_retry_policy(
config: ServerConfig,
storage: Arc<dyn Storage>,
worker_registry: Arc<WorkerRegistry>,
retry_policy: RetryPolicy,
) -> Self
pub fn with_retry_policy( config: ServerConfig, storage: Arc<dyn Storage>, worker_registry: Arc<WorkerRegistry>, retry_policy: RetryPolicy, ) -> Self
Create a new background job server with custom retry policy
Sourcepub async fn is_running(&self) -> bool
pub async fn is_running(&self) -> bool
Check if the server is running
Sourcepub fn config(&self) -> &ServerConfig
pub fn config(&self) -> &ServerConfig
Get server configuration
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BackgroundJobServer
impl !RefUnwindSafe for BackgroundJobServer
impl Send for BackgroundJobServer
impl Sync for BackgroundJobServer
impl Unpin for BackgroundJobServer
impl !UnwindSafe for BackgroundJobServer
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