Struct prefect::RunningJob
source · pub struct RunningJob(pub Arc<RunningJobData>);Expand description
Information about a running job.
Tuple Fields
0: Arc<RunningJobData>Methods from Deref<Target = RunningJobData>
sourcepub async fn checkpoint_blob(
&self,
new_payload: Vec<u8>
) -> Result<OffsetDateTime>
pub async fn checkpoint_blob(
&self,
new_payload: Vec<u8>
) -> Result<OffsetDateTime>
Checkpoint the task, replacing the payload with the passed in value.
sourcepub async fn checkpoint_json<T: Serialize>(
&self,
new_payload: T
) -> Result<OffsetDateTime>
pub async fn checkpoint_json<T: Serialize>(
&self,
new_payload: T
) -> Result<OffsetDateTime>
Checkpoint the task, replacing the payload with the passed in value.
sourcepub async fn heartbeat(&self) -> Result<OffsetDateTime>
pub async fn heartbeat(&self) -> Result<OffsetDateTime>
Tell the queue that the task is still running.
sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Return if the task is past the expiration time or not.
sourcepub fn json_payload<'a, T: Deserialize<'a>>(&'a self) -> Result<T, Error>
pub fn json_payload<'a, T: Deserialize<'a>>(&'a self) -> Result<T, Error>
Deserialize a JSON payload into the requested type.
Trait Implementations
sourceimpl Clone for RunningJob
impl Clone for RunningJob
sourcefn clone(&self) -> RunningJob
fn clone(&self) -> RunningJob
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for RunningJob
impl Debug for RunningJob
sourceimpl Deref for RunningJob
impl Deref for RunningJob
type Target = RunningJobData
type Target = RunningJobData
The resulting type after dereferencing.
Auto Trait Implementations
impl !RefUnwindSafe for RunningJob
impl Send for RunningJob
impl Sync for RunningJob
impl Unpin for RunningJob
impl !UnwindSafe for RunningJob
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