.NET API
JobRetryException
Tracon.Abstractions.dllThe exception an IJobHandler throws to signal that it wants the job retried after a specific delay.
public sealed class JobRetryException : TraconException, ISerializable- Inheritance
- object ← Exception ← TraconException ← JobRetryException
- Implements
- ISerializable
- Inherited Members
- TraconException.ErrorType, Exception.GetBaseException(), Exception.ToString(), Exception.GetType(), Exception.TargetSite, Exception.Message, Exception.Data, Exception.InnerException, Exception.HelpLink, Exception.Source, Exception.HResult, Exception.StackTrace, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”An ordinary exception makes the job re-leasable immediately. A handler that wants backoff throws this instead; the background worker passes the JobRetryException.RetryAfter value into the IJobStore.ReleaseForRetryAsync call.
The attempt count is still capped by JobRecord.Attempt: this exception does not keep the job alive forever.
Constructors
Section titled “Constructors”JobRetryException()
Section titled “ JobRetryException()”Creates a new retry request.
public JobRetryException()JobRetryException(string)
Section titled “ JobRetryException(string)”Creates a new retry request.
public JobRetryException(string message)Parameters
Section titled “Parameters”message string
The error message.
JobRetryException(string, Exception)
Section titled “ JobRetryException(string, Exception)”Creates a new retry request.
public JobRetryException(string message, Exception innerException)Parameters
Section titled “Parameters”message string
The error message.
innerException Exception
The underlying error.
Fields
Section titled “Fields”JobRetryErrorType
Section titled “ JobRetryErrorType”The stable value written for TraconException.ErrorType.
public const string JobRetryErrorType = "job_retry"Field Value
Section titled “Field Value”Properties
Section titled “Properties”ErrorType
Section titled “ ErrorType”Gets the stable error type name written to the run record.
public override string ErrorType { get; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Defaults to the full name of the exception type, so today’s behaviour does
not change. A derived type overrides this member when the record has to be
machine readable — for example TraconContentFilteredException
writes content_filtered. Reports and alert rules can rely on this
stable name instead of an assembly name.
The value is written to RunError.Type and carries no secret.
RetryAfter
Section titled “ RetryAfter”The time to wait before the next attempt. If null, the job may be re-leased immediately.
public TimeSpan? RetryAfter { get; init; }