Table of Contents

Method TryRunNowAsync

Namespace
Millrace.Storage.PostgreSql
Assembly
Millrace.Storage.PostgreSql.dll

TryRunNowAsync(JobId, CancellationToken)

Makes a job that is waiting out its retry backoff claimable immediately (§11.32). Atomic: FailedEnqueued with DueAt cleared, returning true; any other state, or unknown, ⇒ false with no mutation.

public ValueTask<bool> TryRunNowAsync(JobId id, CancellationToken ct)

Parameters

id JobId
ct CancellationToken

Returns

ValueTask<bool>

Remarks

Only Failed. That state means "an attempt failed and the next one is waiting on a clock", which is the only situation where bringing the job forward is well defined. A Scheduled job has never run and its due time is the caller's intent rather than a backoff; a Processing one is already running; a terminal one needs RequeueAsync, which mints a new job (§11.18).

Consumes no retry budget. Attempt and Failures are untouched, because nothing was attempted — only the wait was shortened. An operator who fixes the cause and runs the job now must not find it dead-lettered a step earlier than it would otherwise have been.