pub async fn retry(
transaction: &mut Transaction<'_, Postgres>,
id: Uuid,
by: &str,
reason: &str,
) -> Result<bool>Expand description
Queue the job id again, now, for one more try, if it failed or waits for review,
as an act of by, for reason, kept in axa_job_acts in the caller’s
transaction. The act is ActKind::Retried for a failed job and
ActKind::Released for one in review. Answers whether it was queued again. A job
in any other state, or no such job, changes nothing and writes no act. Its last
error stays until it next runs.
§Errors
Fails on a database error, and with Error::NotACode when by or reason is
empty, longer than MAX_REASON_CHARS, or has a line break, before anything is
written.