Struct faktory::Job [] [src]

pub struct Job {
    pub jid: String,
    pub queue: String,
    pub kind: String,
    pub args: Vec<Value>,
    pub created_at: Option<DateTime<Utc>>,
    pub enqueued_at: Option<DateTime<Utc>>,
    pub at: Option<DateTime<Utc>>,
    pub reserve_for: Option<usize>,
    pub retry: Option<usize>,
    pub backtrace: Option<usize>,
    pub failure: Option<String>,
    pub custom: HashMap<String, Value>,
}

A description of a Faktory job.

See also the Faktory wiki.

Fields

The job's unique identifier.

The queue this job was retrieved from.

This job's type.

The arguments provided for this job.

When this job was created.

When this job was supplied to the Faktory server.

When this job is scheduled for.

Defaults to immediately.

How long to allow this job to run for.

Defaults to 600 seconds.

Number of times to retry this job.

Defaults to 25.

Number of lines of backtrace to keep if this job fails.

Defaults to 0.

Data about this job's most recent failure.

This field is read-only.

Extra context to include with the job.

Faktory workers can have plugins and middleware which need to store additional context with the job payload. Faktory supports a custom hash to store arbitrary key/values in the JSON. This can be extremely helpful for cross-cutting concerns which should propagate between systems, e.g. locale for user-specific text translations, request_id for tracing execution across a complex distributed system, etc.

Methods

impl Job
[src]

[src]

Create a new job of type kind, with the given arguments.

Trait Implementations

impl Debug for Job
[src]

[src]

Formats the value using the given formatter.