Method ClaimOneAsync
- Namespace
- Millrace.Storage.Verification
- Assembly
- Millrace.Storage.Verification.dll
ClaimOneAsync(IJobStorage, string, string, TimeSpan?)
Claims exactly one job, asserting that exactly one came back.
protected static Task<JobRecord> ClaimOneAsync(IJobStorage storage, string workerId = "w1", string queue = "default", TimeSpan? lease = null)
Parameters
storageIJobStorageworkerIdstringqueuestringleaseTimeSpan?
Returns
Remarks
The assertion is part of the helper on purpose: a fact that meant to claim one job and silently got none would otherwise fail later, somewhere that does not name the cause.