Skip to content
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

Ensure last_email_run gets initialized #93

Merged
merged 1 commit into from
May 7, 2024

Conversation

stephen-cox
Copy link
Member

Fixes #92

@graham-web
Copy link

Minor thought... shouldn't it also reset the last_email_run state when the "Enable email notifications" box has become ticked? Else the user would receive a flood of old notifications as soon as they [re-]enable e-mails!

Or perhaps simpler, for the same effect, just update state every time within hook_cron during the early-return?

@ekes
Copy link
Member

ekes commented May 7, 2024

Else the user would receive a flood of old notifications as soon as they [re-]enable e-mails!

Reading the code what gets sent by the module is base on querying using the REQUEST_TIME

and iff the run should happen based on the last run value

So the number of mails should be the same no matter what?

Ahh

OK I'd say another issue for that.

@stephen-cox
Copy link
Member Author

It's probably a good idea to reset the last_email_run state var when turning email sending on.

This would bring in quite a bit of duplication of code when resetting the the var, so I'm thinking of abstracting this into a service to make it easier to test.

Given this is quite critical, I suggest merging this and creating a new issue for reseting the var when enabling email sending.

@finnlewis
Copy link
Member

Discussed at Merge Tuesday. Thanks for your comment @graham-web - we've created a separate issue to deal with that. #94

Otherwise, we're happy to get this out to councils who are testing.

@finnlewis finnlewis merged commit 8279993 into 1.x May 7, 2024
4 checks passed
@stephen-cox stephen-cox deleted the fix/1.x/92-initialise-last-email-run branch May 14, 2024 10:28
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.

[Workflow notifications] Notifications not processed after clean install
4 participants