holiday_pinger
holiday_pinger copied to clipboard
dont send all reminders at once
To avoid potential throttling issues with the external services.
For example, if N users for the same country configure a slack channel, it's probable (if they use the same default reminder time) that when the holiday comes, we'll be making a burst of N requests to slack at almost the same time. This will probably cause slack to reject the requests. The same could happen with most services.
Since there's no special reason to process all the reminders at the same instant (and there's usually several minutes until the next checker run), we could queue/break the reminders in batches and send them with delays.