Struct prefect::JobBuilder
source · pub struct JobBuilder { /* private fields */ }Expand description
A builder for a job to submit to the queue.
Implementations
sourceimpl JobBuilder
impl JobBuilder
sourcepub fn run_at(self, run_at: OffsetDateTime) -> Self
pub fn run_at(self, run_at: OffsetDateTime) -> Self
Set the time at which the job should run.
sourcepub fn json_payload<T: ?Sized + Serialize>(
self,
payload: &T
) -> Result<Self, Error>
pub fn json_payload<T: ?Sized + Serialize>(
self,
payload: &T
) -> Result<Self, Error>
Serialize the payload of the job using serde_json.
sourcepub fn max_retries(self, max_retries: u32) -> Self
pub fn max_retries(self, max_retries: u32) -> Self
Set the maximum number of retries for the job.
sourcepub fn backoff_initial_interval(self, backoff_initial_interval: Duration) -> Self
pub fn backoff_initial_interval(self, backoff_initial_interval: Duration) -> Self
Set the initial backoff interval for the job. See Retries::backoff_initial_interval for more details
sourcepub fn backoff_multiplier(self, backoff_multiplier: f32) -> Self
pub fn backoff_multiplier(self, backoff_multiplier: f32) -> Self
Set the backoff multiplier for the job. See Retries::backoff_multiplier for more details
sourcepub fn backoff_randomization(self, backoff_randomization: f32) -> Self
pub fn backoff_randomization(self, backoff_randomization: f32) -> Self
Set the backoff randomization factor for the job. See Retries::backoff_randomization for more details
sourcepub fn heartbeat_increment(self, heartbeat_increment: Duration) -> Self
pub fn heartbeat_increment(self, heartbeat_increment: Duration) -> Self
Set the heartbeat increment of the job.
Auto Trait Implementations
impl RefUnwindSafe for JobBuilder
impl Send for JobBuilder
impl Sync for JobBuilder
impl Unpin for JobBuilder
impl UnwindSafe for JobBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more