-
Notifications
You must be signed in to change notification settings - Fork 18
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
Lowering retry period for high priority emails to 25 seconds #2031
Conversation
else: | ||
countdown = None | ||
try: | ||
current_app.logger.warning(f"The exception is {repr(e)}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we add this log warning in a specific context? This is not informative of the context. Nonetheless, I added the exception to the parameter
while logging the exception down below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was probably debugging code that slipped through
@@ -0,0 +1,43 @@ | |||
from typing import Any, Dict, Optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to move the parameters logic in its own module to avoid a circular import issue, as it was previously in a notifications init module. This would create issues.
@@ -6,11 +8,13 @@ | |||
|
|||
|
|||
def _check_and_queue_callback_task(notification): | |||
if notification is None: | |||
current_app.logger.warning("No notification provided, cannot queue callback task") | |||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit more null protection, I think I added not part of the scope of these changes and while pairing with someone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Locally, added an exception and sent a high priority email, and it was retried 25 seconds later 👍
However, I cleared that and then sent a low priority email and it too was retried in 25 seconds 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My test had my artificial raise in the wrong place, basically. All good!
Summary | Résumé
Test instructions | Instructions pour tester la modification
provider_tasks.deliver_email
function.Release Instructions | Instructions pour le déploiement
No special instructions.
Reviewer checklist | Liste de vérification du réviseur
This is a suggested checklist of questions reviewers might ask during their
review | Voici une suggestion de liste de vérification comprenant des questions
que les réviseurs pourraient poser pendant leur examen :
une baisse de la quantité de code couvert par les tests automatisés?
fonctionnalité existante?
modification de la politique de confidentialité?
préoccupations liées à la sécurité?
façon importante la performance?
risque d’utiliser des dépendances ajoutées?
setup, etc.) | Faudra-t-il mettre à jour la documentation à la suite de ce
changement (fichier README, etc.)?