Skip to content
Tracon

JobRequest

Namespace Tracon · Assembly Tracon.Abstractions.dll

The description of one job to queue through IJobDispatcher.

public sealed record JobRequest : IEquatable<JobRequest>

objectJobRequest

IEquatable<JobRequest>

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

public JobRequest()

The key of the handler to run. Must be registered with AddJobHandler<T>(key), or be one of JobHandlerKeys.BuiltIn.

public required string HandlerKey { get; init; }

string

The job’s items. Left empty, the items are extracted from JobRequest.Payload the same way a schedule’s payload is.

public IReadOnlyList<string> Items { get; init; }

IReadOnlyList<string>

The lane the job is queued under. Left at JobLanes.Default, TraconSchedulingOptions.LaneByHandlerKey may still route it elsewhere.

public string Lane { get; init; }

string

This job’s own attempt limit. null applies TraconSchedulingOptions.MaxAttempts.

public int? MaxAttempts { get; init; }

int?

The input set or parameters, interpreted by the handler.

public JsonElement Payload { get; init; }

JsonElement

The earliest time the job may run (UTC). null means as soon as a worker leases it.

public DateTimeOffset? ScheduledFor { get; init; }

DateTimeOffset?

The handler’s target — the agent or workflow name for the built-in keys. A handler that needs no target passes an empty string.

public required string TargetName { get; init; }

string

The tenant the job belongs to.

public required string TenantId { get; init; }

string

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(JobRequest? other)

other JobRequest?

bool

public override int GetHashCode()

int

public override string ToString()

string

public static bool operator ==(JobRequest? left, JobRequest? right)

left JobRequest?

right JobRequest?

bool

public static bool operator !=(JobRequest? left, JobRequest? right)

left JobRequest?

right JobRequest?

bool