You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The association between email functions, templates and message types could be simplified by using the message type for all 3 (in cases where there is an appropriate message type). If there's no relevant message type, use the same string, at least.
Since #375 is reported, I won't start the following changes (same with #359). The patch under details has already done (2) and (3).
Rename template files to read: type.es.html, where type is a lowercase MessageType enum value
Rename mail.send_* functions to match a MessageType enum value (where one is available, a str if not)
Change mail.send_* calls and Message creation to: (or, maybe call the send_* message directly, if not saving)
Now that sending the email and creating the Message is one function call, we can easily make email a BackgroundTask (the typical example). This would mean moving the (inconsistently applied) ClientError handling.
Draft commit messages:
feat: Stop saving a Message for overdue applications to lenders (the associated application was random, and there are already Messages for the overdue applications to OCP).
chore: Send mail and create message as background task.
The association between email functions, templates and message types could be simplified by using the message type for all 3 (in cases where there is an appropriate message type). If there's no relevant message type, use the same string, at least.
Since #375 is reported, I won't start the following changes (same with #359). The patch under details has already done (2) and (3).
Rename template files to read:
type.es.html
, wheretype
is a lowercaseMessageType
enum valueRename
mail.send_*
functions to match aMessageType
enum value (where one is available, astr
if not)Change
mail.send_*
calls and Message creation to: (or, maybe call thesend_*
message directly, if not saving)and define a
send
function like:Now that sending the email and creating the Message is one function call, we can easily make email a BackgroundTask (the typical example). This would mean moving the (inconsistently applied) ClientError handling.
Draft commit messages:
Related: #367
Note: If multiple background tasks are added: https://www.starlette.io/background/
The text was updated successfully, but these errors were encountered: