Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add details regarding the delay #114

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions background-processing/dealing-with-exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ In the previous paragraph I said that Hangfire *will try* to change its state to

This filter is applied globally to all methods and have 10 retry attempts by default. So, your methods will be retried in case of exception automatically, and you receive warning log messages on every failed attempt. If retry attempts exceeded their maximum, the job will be move to the ``Failed`` state (with an error log message), and you will be able to retry it manually.

The delay between attempts will increase after each exception, ranging from ~15 seconds, up to a maximum of ~2 hours, following the formula ((attempts - 1) ^ 4) + 15 + (random.next(40) * attempts)

If you don't want a job to be retried, place an explicit attribute with 0 maximum retry attempts value:

.. code-block:: c#
Expand Down