-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Overriding retry policy for SMS high priority
- Loading branch information
1 parent
86be8bc
commit d5ce6a2
Showing
2 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from app.models import BULK, NORMAL, PRIORITY | ||
|
||
# Default retry policy for all notifications. | ||
RETRY_POLICY_DEFAULT = { | ||
"max_retries": 48, | ||
"interval_start": 300, | ||
"interval_step": 300, | ||
"interval_max": 300, | ||
"retry_errors": None, | ||
} | ||
|
||
# Retry policy for high priority notifications. | ||
RETRY_POLICY_HIGH = { | ||
"max_retries": 48, | ||
"interval_start": 25, | ||
"interval_step": 25, | ||
"interval_max": 25, | ||
"retry_errors": None, | ||
} | ||
|
||
# Retry policies for each notification priority lanes. | ||
RETRY_POLICIES = { | ||
BULK: RETRY_POLICY_DEFAULT, | ||
NORMAL: RETRY_POLICY_DEFAULT, | ||
PRIORITY: RETRY_POLICY_HIGH, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters