(default-death-handler _error-service-config job ex)
Sample death handler of a Job.
Called when a job dies, i.e. fails & has exhausted retries.
Logs exception & job details.
Sample death handler of a Job.\ Called when a job dies, i.e. fails & has exhausted retries.\ Logs exception & job details.
(default-error-handler _error-service-config job ex)
Sample error handler of a Job.
Called when a job fails.
Logs exception & job details.
Sample error handler of a Job.\ Called when a job fails.\ Logs exception & job details.
Map of sample configs for error handling & retries.
A Job is considered to fail when it throws an exception during execution.
A Job is considered dead when it has exhausted max-retries
:max-retries
: Number of times to retry before marking a Job as dead.
:retry-delay-sec-fn-sym
: A fully-qualified function symbol to calculate backoff
time in seconds before retrying a Job.
Takes retry-count
as input & returns backoff-seconds as a positive integer.
Example : default-retry-delay-sec
:error-handler-fn-sym
: A fully-qualified function symbol called when a Job fails.
Takes error-service-config
, job
& exception
as input.
Example : default-error-handler
:death-handler-fn-sym
: A fully-qualified function symbol called when a Job dies.
Takes error-service-config
, job
& exception
as input.
Example : default-death-handler
:skip-dead-queue
: Boolean flag for skipping Dead Jobs queue.
:retry-queue
: Optional queue for retrying failed jobs in a separate queue.
This helps increase/decrease priority of retrying failed jobs.
Note: When using different retry queue, remember to start a worker process for that.
Map of sample configs for error handling & retries.\ A Job is considered to fail when it throws an exception during execution.\ A Job is considered dead when it has exhausted `max-retries` #### Mandatory Keys `:max-retries` : Number of times to retry before marking a Job as dead. `:retry-delay-sec-fn-sym` : A fully-qualified function symbol to calculate backoff time in seconds before retrying a Job.\ Takes `retry-count` as input & returns backoff-seconds as a positive integer.\ *Example* : [[default-retry-delay-sec]] `:error-handler-fn-sym` : A fully-qualified function symbol called when a Job fails.\ Takes `error-service-config`, `job` & `exception` as input.\ *Example* : [[default-error-handler]] `:death-handler-fn-sym` : A fully-qualified function symbol called when a Job dies.\ Takes `error-service-config`, `job` & `exception` as input.\ *Example* : [[default-death-handler]] `:skip-dead-queue` : Boolean flag for skipping Dead Jobs queue. #### Optional Keys `:retry-queue` : Optional queue for retrying failed jobs in a separate queue.\ This helps increase/decrease priority of retrying failed jobs.\ **Note**: When using different retry queue, remember to start a worker process for that.
(default-retry-delay-sec retry-count)
Calculates backoff seconds before a failed Job is retried.
Calculates backoff seconds before a failed Job is retried.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close