Detect duplicate notifications
For example, when a job fails part way through and is retried it's possible to end up with a bunch of duplicate scheduled notifications.
Detecting this and throwing an exception or maybe silent fail? Should be behind a config option
Adding target type/id in #20 will make this much easier.
So we just check the notification_type and the target_id and the send time right? What is a good buffer time range for predicting duplicates? Same hour?
Do you think this should happen at creation or send?
What is a good buffer time range for predicting duplicates? Same hour?
I was actually just thinking exact match
Do you think this should happen at creation or send?
Creation.
Couldn't this be as simple as change create to firstOrCreate on line #50 in the ScheduledNotification wrapper? @atymic
Couldn't this be as simple as change create to firstOrCreate on line #50 in the ScheduledNotification wrapper? @atymic
Yep, that would probably work. Just need to make sure were don't apply it to anon notifications. Will PR soon :)
@atymic - will you remind me why not with anon notifications?
In an anon notification the recipient/channel data is inside the serialized target object (which will be different depending on the order, time, etc)