Method RenewLeasesAsync
RenewLeasesAsync(string, IReadOnlyList<JobId>, TimeSpan, CancellationToken)
Extends leases for in-flight jobs; returns the ids actually renewed.
public ValueTask<IReadOnlyList<JobId>> RenewLeasesAsync(string workerId, IReadOnlyList<JobId> jobs, TimeSpan lease, CancellationToken ct)
Parameters
workerIdstringjobsIReadOnlyList<JobId>leaseTimeSpanctCancellationToken
Returns
Remarks
Renewed iff State == Processing && WorkerId == workerId — LeaseUntil is
NOT consulted: an expired-but-unreclaimed lease IS renewable (resurrection), atomically
per job against concurrent ClaimAsync(ClaimRequest, CancellationToken) (whichever commits first wins).
Ownership ends only when another claim changes WorkerId/Attempt. The result additionally
excludes ids whose CancelRequested is set — the worker
disambiguates via GetJobAsync(JobId, CancellationToken).