Skip to content

JobRecord

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

The summary of a queued job. The header of its items (JobItemRecord).

public sealed record JobRecord : IEquatable<JobRecord>

objectJobRecord

IEquatable<JobRecord>

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

public JobRecord()

The number of lease attempts. Increments on every IJobStore.LeaseAsync call.

public int Attempt { get; init; }

int

The completion time (UTC). null while the job is in progress.

public DateTimeOffset? CompletedAt { get; init; }

DateTimeOffset?

The creation time (UTC).

public required DateTimeOffset CreatedAt { get; init; }

DateTimeOffset

The number of items that completed successfully.

public int DoneItems { get; init; }

int

The failure message. Populated only for JobStatus.Failed.

public string? ErrorMessage { get; init; }

string?

The number of items that failed.

public int FailedItems { get; init; }

int

The job identifier.

public required Guid Id { get; init; }

Guid

The job’s kind.

public required JobKind Kind { get; init; }

JobKind

The identifier of the worker currently leasing the job. null if not leased.

public string? LeaseOwner { get; init; }

string?

The time the current lease expires (UTC). The job may be re-leased once it expires.

public DateTimeOffset? LeaseUntil { get; init; }

DateTimeOffset?

The maximum number of attempts specific to this job. If null, AgentPrismSchedulingOptions.MaxAttempts applies.

public int? MaxAttempts { get; init; }

int?

Webhook delivery uses a ladder different from the global setting; this field prevents a single global number from being forced onto every job kind.

The input set or parameters.

public JsonElement Payload { get; init; }

JsonElement

The identifier of the schedule that produced this job. null for manually created (one-off) jobs.

public Guid? ScheduleId { get; init; }

Guid?

The earliest time the job is eligible to run (UTC).

public required DateTimeOffset ScheduledFor { get; init; }

DateTimeOffset

The time the first lease happened (UTC).

public DateTimeOffset? StartedAt { get; init; }

DateTimeOffset?

The job’s current status.

public required JobStatus Status { get; init; }

JobStatus

The agent or workflow name to run.

public required string TargetName { get; init; }

string

The tenant the job belongs to.

public required string TenantId { get; init; }

string

The total number of items.

public int TotalItems { get; init; }

int

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(JobRecord? other)

other JobRecord?

bool

public override int GetHashCode()

int

public override string ToString()

string

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

left JobRecord?

right JobRecord?

bool

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

left JobRecord?

right JobRecord?

bool