Table of Contents

Method RequeueAsync

Namespace
Millrace
Assembly
Millrace.dll

RequeueAsync(JobId, CancellationToken)

Runs a finished job again, as a new job carrying a link back to it. Returns the new id, or null if id does not exist.

ValueTask<JobId?> RequeueAsync(JobId id, CancellationToken ct = default)

Parameters

id JobId
ct CancellationToken

Returns

ValueTask<JobId?>

Remarks

A new job, not a revived one (§11.19). Every other part of the contract treats a terminal record as immutable, and rewriting one to make it runnable again would break that for the sake of a single operator action. The new job records RequeuedFrom so the two ends stay visible to each other.

Three consequences fall out rather than being chosen: the retry budget starts fresh because the job is new; the idempotency key is carried, so if another active job already holds it the existing enqueue semantics make this a no-op returning that job's id; and the original's continuations are not revived, because they were cancelled when it died and nothing about a new job resurrects them.

Requeueing a job that is still running is refused — that is what CancelAsync(JobId, CancellationToken) is for.