Class LeasedJob
- Namespace
- MailFathom.Application.Jobs
- Assembly
- MailFathom.Application.dll
One job a claim handed to one attempt, with the lease that attempt holds it under.
public sealed record LeasedJob : IEquatable<LeasedJob>
- Inheritance
-
LeasedJob
- Implements
- Inherited Members
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.
Constructors
- LeasedJob(JobId, JobType, JobIdempotencyKey, IJobPayload, MailAccountId?, int, JobLease)
One job a claim handed to one attempt, with the lease that attempt holds it under.
Properties
- AttemptCount
Which attempt this is, counting from one.
- JobId
The job this attempt holds.
- JobType
The kind of work, which is also the contract its payload was read back as.
- Key
The identity the execution was enqueued under.
- Lease
The lease this attempt holds the job under.
- Payload
The references the work is described by.