CargueroTaskBunny.JobError (CargueroCargueroTaskBunny v0.0.4) View Source

A struct that holds an error information occured during the job processing.

Attributes

  • job: the job module failed
  • payload: the payload(arguments) for the job execution
  • error_type: the type of the error. :exception, :return_value, :timeout or :exit
  • exception: the inner exception (option)
  • stacktrace: the stacktrace (only available for the exception)
  • return_value: the return value from the job (only available for the return value error)
  • reason: the reason information passed with EXIT signal (only available for exit error)
  • raw_body: the raw body for the message
  • meta: the meta data given by RabbitMQ
  • failed_count: the number of failures for the job processing request
  • queue: the name of the queue
  • concurrency: the number of concurrent job processing of the worker
  • pid: the process ID of the worker
  • reject: sets true if the job is rejected for the failure (means it won't be retried again)

Link to this section Summary

Functions

Take information related to the result and make some of them JSON encode safe.

Link to this section Types

Specs

t() :: %CargueroTaskBunny.JobError{
  concurrency: integer(),
  error_type: :exception | :return_value | :timeout | :exit | nil,
  exception: struct() | nil,
  failed_count: integer(),
  job: atom() | nil,
  meta: map(),
  payload: any(),
  pid: pid() | nil,
  queue: String.t(),
  raw_body: String.t(),
  reason: any(),
  reject: boolean(),
  return_value: any(),
  stacktrace: [tuple()] | nil
}

Link to this section Functions

Link to this function

get_result_info(job_error)

View Source

Specs

get_result_info(t()) :: map()

Take information related to the result and make some of them JSON encode safe.

Since raw body can be bigger as you retry, you do not want to put the information.