TaskBunny v0.2.2 TaskBunny.FailureBackend behaviour

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, TaskBunny reports the job failures to Logger. If you want to report the error to different services, you can configure your custom failure backend.

config :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 :task_bunny, failure_backend: [
  TaskBunny.FailureBackend.Logger,
  YourApp.CustomFailureBackend
]

Example

See the implmentation of TaskBunny.FailureBackend.Logger.

Argument

See TaskBunny.JobError for the details.

Summary

Callbacks

Callback to report a job error

Callbacks

report_job_error(arg0)
report_job_error(TaskBunny.JobError.t) :: any

Callback to report a job error.