Table of Contents

Method RecordFailedPreparationAsync

Namespace
MailFathom.Application.Jobs.Execution
Assembly
MailFathom.Application.dll

RecordFailedPreparationAsync(LeasedJob, Exception, CancellationToken)

Records an attempt whose handler could not be composed because what it reads failed to load first.

public Task<JobExecutionResult> RecordFailedPreparationAsync(LeasedJob job, Exception failure, CancellationToken stoppingToken)

Parameters

job LeasedJob

The job this attempt holds.

failure Exception

What preparing the attempt raised.

stoppingToken CancellationToken

Reports that the host is stopping, in which case the job is released rather than failed.

Returns

Task<JobExecutionResult>

What the attempt did, in terms that carry no mail content.

Remarks

The failure is classified and recorded exactly as a handler's own would be, so a database that was briefly away retries the job rather than failing the batch it was claimed in, and the exception is dropped once classified.

Exceptions

ArgumentNullException

Thrown when job or failure is null.