Search Results for

    Show / Hide Table of Contents

    Class JobQueueOptions

    options for job queues

    Inheritance
    object
    JobQueueOptions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: FastEndpoints
    Assembly: FastEndpoints.dll
    Syntax
    public class JobQueueOptions

    Properties

    ExecutionTimeLimit

    the per job type max execution time limit for handler executions unless otherwise overridden using LimitsFor<TCommand>(int, TimeSpan) defaults to Infinite.

    Declaration
    public TimeSpan ExecutionTimeLimit { get; set; }
    Property Value
    Type Description
    TimeSpan

    MaxConcurrency

    the default max concurrency per job type. default value is the number of logical processors of the computer. you can specify per queue type overrides using LimitsFor<TCommand>(int, TimeSpan)

    Declaration
    public int MaxConcurrency { get; set; }
    Property Value
    Type Description
    int

    StorageProbeDelay

    specifies the interval for periodic re-checks of the storage to detect any scheduled jobs. these checks ensure that re-scheduled jobs are promptly executed. the default interval is set to 60 seconds. a shorter delay will make re-scheduled jobs run faster but will increase the overall load on the storage system, due to too frequent queries being issued. only reduce this delay if you need re-scheduled jobs re-execute faster.

    Declaration
    public TimeSpan StorageProbeDelay { get; set; }
    Property Value
    Type Description
    TimeSpan

    Methods

    LimitsFor<TCommand>(int, TimeSpan)

    specify execution limits such a max concurrency and execution time limit for a given command type.

    Declaration
    public void LimitsFor<TCommand>(int maxConcurrency, TimeSpan timeLimit) where TCommand : ICommand
    Parameters
    Type Name Description
    int maxConcurrency

    the maximum number of command executions of the same command type that's allowed to execute at the same time

    TimeSpan timeLimit

    the maximum amount of time each command is allowed to execute for. when execution time exceeds this value, a OperationCanceledException will be thrown. when that happens you can handle it in the OnHandlerExecutionFailureAsync(TStorageRecord, Exception, CancellationToken) method.

    Type Parameters
    Name Description
    TCommand

    the type of the command the limits apply to

    In this article
    Back to top Developed by Đĵ ΝιΓΞΗΛψΚ and contributors / Licensed under MIT / Website generated by DocFX