CargueroTaskBunny.FailureBackend behaviour (CargueroCargueroTaskBunny v0.0.6) View Source

A behaviour module to implement the your own failure backend.

Note the backend is called only for the errors caught during job processing. Any other errors won't be reported to the backend.

Configuration

By default, CargueroTaskBunny reports the job failures to Logger. If you want to report the error to different services, you can configure your custom failure backend.

config :carguero_task_bunny, failure_backend: [YourApp.CustomFailureBackend]

You can also report the errors to the multiple backends. For example, if you want to use our default Logger backend with your custom backend you can configure like below:

config :carguero_task_bunny, failure_backend: [
  CargueroTaskBunny.FailureBackend.Logger,
  YourApp.CustomFailureBackend
]

Example

See the implmentation of CargueroTaskBunny.FailureBackend.Logger.

Argument

See CargueroTaskBunny.JobError for the details.

Link to this section Summary

Callbacks

Callback to report a job error.

Link to this section Callbacks

Specs

report_job_error(CargueroTaskBunny.JobError.t()) :: any()

Callback to report a job error.