TaskBunny.FailureBackend behaviour (CargueroTaskBunny v0.0.3) 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, 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.
Link to this section Summary
Callbacks
Callback to report a job error.
Link to this section Callbacks
Specs
report_job_error(TaskBunny.JobError.t()) :: any()
Callback to report a job error.