by jewel · 13y ago · 0 comments
For example, we use trello at my day job to track projects and tasks. They offer to send emails either "periodically (once an hour)" or "instantly". Nevertheless, they still fold multiple actions into a single email if they happen in rapid succession, and send an email that says something like "2 new notifications on the board Development". I would much rather see each notification as a separate email since sometimes they are relevant to me and sometimes they aren't.
Coding wise, it is a simple as setting a run_at on our Delayed::Job and a custom queue for this user notification. For every new notification we check if there is another delayed job to be procesed in that queue, if it is the case we just edit the run_at to add a few more minutes.
I'm assuming when a new user gets added to the org, they probably received one notification saying they've been added to so and so. If that's the case couldn't you just stick all those allowed permissions within the same email?