- 🇨🇦Canada JayDarnell Guelph, Ontario
I'm not sure this is something I'll still work on. Definitely low on the priority list.
There are three types of emails sent from this module:
Currently all three of these types of messages attempt to send an email and just assume it succeeds. After attempting to send the email the module blindly removes the email item from the queue and moves to the next item. We should add a check to see if the message actually sends and if not release the item back into the queue.
For announcements and immediate subscriptions this is fairly simple. The item just goes back in the queue to be processed later. But for daily subscriptions things are a bit more complicated. Currently the way we determine when daily subs are done processing is if the queue is empty. If we release items back into the queue for failed sends and they continue to fail then we could get into a situation where the daily queue never completes.
We likely need to set a (configurable?) time limit for how long the module should work on processing daily subs, after which it considers the task done even if items are still left in the queue - OR - we could add a new table for the module where failed messages are saved. Then moving forward, any time a failure occurs we check that table and increment the fail counter for that user. If the failure count reaches a threshold (configurable?) we remove the item from the queue and stop trying to send. We could also check this table when building subs and stop building subs for folks with a failure count over the threshold.
If we went this route we would likely need to add a new admin page to the module where admins can see a list of users who have currently gone over the threshold. Otherwise it will be potentially confusing for admins as to why some users aren't getting messages anymore. Alternatively we could display a notification on the user's profile saying that the threshold was reached.
Active
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
I'm not sure this is something I'll still work on. Definitely low on the priority list.