mule/jobs/transitions

Values

pub fn cancel(
  job job: job.Job,
  now now: timestamp.Timestamp,
) -> job.Job
pub fn complete(
  job job: job.Job,
  now now: timestamp.Timestamp,
) -> job.Job
pub fn discard(
  job job: job.Job,
  now now: timestamp.Timestamp,
  error error: error.Error,
) -> job.Job
pub fn error(
  job job: job.Job,
  now now: timestamp.Timestamp,
  error error: error.Error,
  delay delay: duration.Duration,
) -> job.Job
pub fn retry(
  job job: job.Job,
  now now: timestamp.Timestamp,
) -> job.Job

The bulk-retry transition (basic.ex retry_all_jobs’s SET clause): back to available now, max_attempts bumped to attempt + 1 when attempts were spent (GREATEST(max_attempts, attempt + 1)), terminal timestamps cleared. attempt and errors are untouched. State eligibility lives in the engines (the subquery), not here.

pub fn snooze(
  job job: job.Job,
  now now: timestamp.Timestamp,
  delay delay: duration.Duration,
) -> job.Job
Search Document