pub enum JobPriority {
Low = 1,
Normal = 2,
High = 3,
Critical = 4,
}Expand description
Job priority for execution order
Higher priority jobs are executed first. Critical > High > Normal > Low.
§Examples
use aurora_db::workers::{Job, JobPriority};
// Time-sensitive payment
let payment = Job::new("process_payment")
.with_priority(JobPriority::Critical);
// User-facing task
let notification = Job::new("send_notification")
.with_priority(JobPriority::High);
// Background cleanup
let cleanup = Job::new("cleanup_temp_files")
.with_priority(JobPriority::Low);Variants§
Low = 1
Low priority (value: 1) - background tasks, cleanup
Normal = 2
Normal priority (value: 2) - default for most jobs
High = 3
High priority (value: 3) - user-facing operations
Critical = 4
Critical priority (value: 4) - payments, security
Trait Implementations§
Source§impl Clone for JobPriority
impl Clone for JobPriority
Source§fn clone(&self) -> JobPriority
fn clone(&self) -> JobPriority
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JobPriority
impl Debug for JobPriority
Source§impl<'de> Deserialize<'de> for JobPriority
impl<'de> Deserialize<'de> for JobPriority
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for JobPriority
impl Ord for JobPriority
Source§fn cmp(&self, other: &JobPriority) -> Ordering
fn cmp(&self, other: &JobPriority) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for JobPriority
impl PartialEq for JobPriority
Source§impl PartialOrd for JobPriority
impl PartialOrd for JobPriority
Source§impl Serialize for JobPriority
impl Serialize for JobPriority
impl Copy for JobPriority
impl Eq for JobPriority
impl StructuralPartialEq for JobPriority
Auto Trait Implementations§
impl Freeze for JobPriority
impl RefUnwindSafe for JobPriority
impl Send for JobPriority
impl Sync for JobPriority
impl Unpin for JobPriority
impl UnwindSafe for JobPriority
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