Constructor LeasedJob
- Namespace
- MailFathom.Application.Jobs
- Assembly
- MailFathom.Application.dll
LeasedJob(JobId, JobType, JobIdempotencyKey, IJobPayload, MailAccountId?, int, JobLease)
One job a claim handed to one attempt, with the lease that attempt holds it under.
public LeasedJob(JobId JobId, JobType JobType, JobIdempotencyKey Key, IJobPayload Payload, MailAccountId? AccountId, int AttemptCount, JobLease Lease)
Parameters
JobIdJobIdThe job this attempt holds.
JobTypeJobTypeThe kind of work, which is also the contract its payload was read back as.
KeyJobIdempotencyKeyThe identity the execution was enqueued under.
PayloadIJobPayloadThe references the work is described by.
AccountIdMailAccountId?The account the work belongs to, or null when it belongs to none.
AttemptCountintWhich attempt this is, counting from one.
LeaseJobLeaseThe lease this attempt holds the job under.
Remarks
The attempt number counts from one and includes this attempt, so a job being run for the first time reports one. It is counted by the claim rather than by whatever runs the work, because a process that dies mid-execution never reaches a line that would have counted it and its attempt would otherwise be invisible.