Skip to content

Conversation

thomasleese
Copy link
Contributor

@thomasleese thomasleese commented Nov 19, 2024

This adds a job which sends the vaccination confirmation emails at a specific time in the evening every day, ensuring that any vaccination records which have been created since the last ones were sent out, get processed.

The job is set up such that it can be run at any point and it will send the confirmations for any new vaccination records that have been created since the last time the job ran will get their confirmation emails sent out.

This also ensures that we don't send confirmation emails if a vaccination record is updated, unless a confirmation email was already sent out and it's the outcome of the vaccination that has changed.

@thomasleese thomasleese changed the title Send vaccination confirmations in the evening Send vaccination confirmations on a schedule Nov 19, 2024
@thomasleese thomasleese force-pushed the vaccination-confirmation-evening branch from 5091ad9 to 2d38ee8 Compare November 20, 2024 07:45
@thomasleese thomasleese force-pushed the vaccination-confirmation-evening branch from 2d38ee8 to 6e77223 Compare November 20, 2024 10:22
@thomasleese thomasleese force-pushed the vaccination-confirmation-evening branch from 6e77223 to cb3a0ea Compare November 20, 2024 10:25
@thomasleese thomasleese marked this pull request as ready for review November 20, 2024 10:29
@thomasleese thomasleese force-pushed the vaccination-confirmation-evening branch from cb3a0ea to f05f294 Compare November 20, 2024 11:14
@thomasleese thomasleese force-pushed the vaccination-confirmation-evening branch from f05f294 to de2cb39 Compare November 20, 2024 11:27
@thomasleese thomasleese force-pushed the vaccination-confirmation-evening branch from de2cb39 to 6a0a0f0 Compare November 20, 2024 13:31
@tvararu
Copy link
Member

tvararu commented Nov 20, 2024

I like this pattern/approach

This adds a new column on vaccination records for tracking when the
confirmation email has been sent, allowing us to batch together and send
emails at the end of the day.
The patient can be determined from the vaccination record.
And only if the vaccination confirmation email has already been sent,
preventing these from being sent prematurely.
If a confirmation email was never sent. This prevents the parent
receiving an email talking about a previous email have been sent in
error when said email was never sent.
This adds a job which sends the vaccination confirmation emails at a
specific time in the evening every day, ensuring that any vaccination
records which have been created since the last ones were sent out, get
processed.

The job is set up such that it can be run at any point and it will send
the confirmations for any new vaccination records that have been created
since the last time the job ran will get their confirmation emails sent
out.
@thomasleese thomasleese force-pushed the vaccination-confirmation-evening branch from 6a0a0f0 to 58f40ca Compare November 20, 2024 14:47
@tvararu tvararu temporarily deployed to mavis-pr-2513 November 20, 2024 14:48 Inactive
Copy link

@thomasleese thomasleese merged commit 6e6c6cb into main Nov 20, 2024
12 checks passed
@thomasleese thomasleese deleted the vaccination-confirmation-evening branch November 20, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants