Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect duplicate notifications #15

Open
atymic opened this issue Oct 2, 2019 · 8 comments
Open

Detect duplicate notifications #15

atymic opened this issue Oct 2, 2019 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@atymic
Copy link
Collaborator

atymic commented Oct 2, 2019

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

@atymic atymic added the enhancement New feature or request label Oct 17, 2019
@atymic
Copy link
Collaborator Author

atymic commented Oct 17, 2019

Adding target type/id in #20 will make this much easier.

@thomasjohnkane
Copy link
Owner

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?

@thomasjohnkane
Copy link
Owner

Do you think this should happen at creation or send?

@atymic
Copy link
Collaborator Author

atymic commented Oct 20, 2019

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.

@thomasjohnkane
Copy link
Owner

Couldn't this be as simple as change create to firstOrCreate on line #50 in the ScheduledNotification wrapper? @atymic

@atymic
Copy link
Collaborator Author

atymic commented Oct 27, 2019

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 atymic self-assigned this Oct 27, 2019
@thomasjohnkane
Copy link
Owner

@atymic - will you remind me why not with anon notifications?

@atymic
Copy link
Collaborator Author

atymic commented Nov 18, 2019

In an anon notification the recipient/channel data is inside the serialized target object (which will be different depending on the order, time, etc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants