Repository navigation
Record how scheduled email runs went, and retry refused reminders - #146
Open
Darknode-Official wants to merge 1 commit into
Open
Darknode-Official wants to merge 1 commit into
Darknode-Official wants to merge 1 commit into
Conversation
The Worker keeps no logs, so a failing cron looked the same as a quiet one. Each run of the
reminder and the Monday summary now writes cronRuns/{job}, and the Owner page shows it.
A reminder batch the email provider refused (4xx) no longer counts as sent: the records are
removed and the next run tries again. After a timeout or 5xx they stay, so nobody gets two.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Worker keeps no logs, so nobody can tell whether the daily reminder or the Monday summary ran, failed or had nothing to send. Reminders were also recorded before sending and stayed recorded when the provider refused the batch, so those people never got the email and still counted as "Sent".
What
worker/cron-log.js: every scheduled run writescronRuns/{job}={ at, ok, sent, note }. Jobs switched off on a server (staging) write nothing.No rules change:
cronRuns/has no client rule, so clients are denied.Verified
npm test: 5237 passed, including a refused batch (422), a server error (500) and a switched-off job.Not verified