Class JobFailureRecord
- Namespace
- MailFathom.Application.Jobs
- Assembly
- MailFathom.Application.dll
What one failed attempt leaves on the job's row: the verdict, and the reason it was reached.
public sealed record JobFailureRecord : IEquatable<JobFailureRecord>
- Inheritance
-
JobFailureRecord
- Implements
- Inherited Members
Remarks
The reason is written for an operator who is looking at a job that stopped, so it names the failure rather than
describing it: a first-party failure is named by its type and its stable code, and anything else by the type the
runtime or a library raised. An exception message never becomes a reason. Only a
MailFathomException promises its message is free of mail content, and a job's whole purpose is to work on a
message — so a library's message quoting a subject, an address, or a header would put mail content in a column that
outlives the run and reaches every log line reporting it.
A record replaces whatever the previous attempt left, because what an operator acts on is why the job is where it is now. The attempt count beside it is what says how many times it got there.
Fields
- MaximumReasonLength
The greatest length a reason may have, which bounds the column it is stored in.
Properties
- Classification
Gets whether repeating the work could succeed without anything else changing first.
- ExecutionTimedOut
Gets the record left by an attempt that exceeded the time one job is allowed to run for.
- HandlerMissing
Gets the record left by a job claimed for a type this build has no handler for.
- Reason
Gets the operator-safe name of what failed, carrying nothing out of the message the job points at.
Methods
- Create(JobFailureClassification, string)
States what one failed attempt records against its job.