-
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
send emails using 3 new queues #1997
Conversation
scripts/run_celery_no_sending.sh
Outdated
@@ -0,0 +1,10 @@ | |||
#!/bin/sh |
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.
run_celery_core_tasks as an alternative name maybe?
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.
yeah, that's less clunky!
(1, NORMAL, QueueNames.SEND_EMAIL_LOW), # autoswitch to bulk queue if bulk threshold is met. | ||
(1_000, NORMAL, QueueNames.SEND_EMAIL_MEDIUM), # keep normal priority | ||
(1, BULK, QueueNames.SEND_EMAIL_LOW), # keep bulk priority | ||
(1_000, BULK, QueueNames.SEND_EMAIL_MEDIUM), # autoswitch to normal queue if normal threshold is met. |
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.
So much better. 👏
@@ -1103,7 +1103,7 @@ def test_process_rows_works_without_key_type( | |||
"to": "recip", | |||
"row_number": "row_num", | |||
"personalisation": {"foo": "bar"}, | |||
"queue": QueueNames.SEND_SMS_MEDIUM if template_type == SMS_TYPE else "send-{}-tasks".format(template_type), | |||
"queue": QueueNames.SEND_SMS_MEDIUM if template_type == SMS_TYPE else QueueNames.SEND_EMAIL_MEDIUM, |
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.
Wouldn't that change trigger failures for SMS notification type test parameters? 🤔
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.
the SMS ones are being set to QueueNames.SEND_SMS_MEDIUM
as before. Previously the else
really should have been just else "send-email-tasks"
since there's no letter type in the test parameters.
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.
oh I read that change incorrectly, it's all orthogonal now and good
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.
Looks very good overall. I probably expected more tests to break and more changes. I left a question for one test output though where it seems either the test would fail or should fail.
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.
Summary | Résumé
https://app.zenhub.com/workspaces/notify-planning-core-6411dfb7c95fb80014e0cab0/issues/gh/cds-snc/notification-planning-core/4
Move email sending (ie
deliver_email()
) to their own queues (send-email-high, send-email-medium, send-email-low)note that these queues are still consumed by the same celery workers as the current email sending queues.
This PR is based on the analogous SMS work done in this PR.
Test instructions | Instructions pour tester la modification
Release Instructions | Instructions pour le déploiement