Verk.Job (Verk v1.7.2) View Source
The Job struct.
Set config :verk, max_retry_count: value
on your config file to set the default max
amount of retries on all your Verk.Job
when none is informed. Defaults at 25
.
Link to this section Summary
Functions
Decode the JSON payload storing the original json as part of the struct.
Decode the JSON payload storing the original json as part of the struct, raising if there is an error
Encode the struct to a JSON string, raising if there is an error
Link to this section Types
Specs
t() :: %Verk.Job{ args: term(), class: String.t() | atom(), created_at: term(), enqueued_at: term(), error_backtrace: String.t(), error_message: String.t(), failed_at: DateTime.t(), finished_at: DateTime.t(), jid: String.t(), max_retry_count: term(), original_json: term(), queue: String.t(), retried_at: DateTime.t(), retry_count: non_neg_integer() }
Link to this section Functions
Specs
decode(binary()) :: {:ok, %Verk.Job{ args: term(), class: term(), created_at: term(), enqueued_at: term(), error_backtrace: term(), error_message: term(), failed_at: term(), finished_at: term(), jid: term(), max_retry_count: term(), original_json: term(), queue: term(), retried_at: term(), retry_count: term() }} | {:error, Jason.DecodeError.t()}
Decode the JSON payload storing the original json as part of the struct.
Specs
decode!(binary()) :: %Verk.Job{ args: term(), class: term(), created_at: term(), enqueued_at: term(), error_backtrace: term(), error_message: term(), failed_at: term(), finished_at: term(), jid: term(), max_retry_count: term(), original_json: term(), queue: term(), retried_at: term(), retry_count: term() }
Decode the JSON payload storing the original json as part of the struct, raising if there is an error
Specs
Encode the struct to a JSON string, raising if there is an error