-
-
Notifications
You must be signed in to change notification settings - Fork 4
Store sent_at per channel instead of once per notification - plus a bunch of renames #17
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Renamed NotificationFrequency -> BaseFrequency - Renamed EmailFrequency model to NotificationFrequency model, it shouldn't be tied to "email" (closes #15) - Renamed NotificationType.default_email_frequency -> NotificationType.default_frequency - Renamed NotificationType.set_email_frequency -> NotificationType.set_frequency - Renamed NotificationType.get_email_frequency -> NotificationType.get_frequency - Renamed NotificationType.reset_email_frequency_to_default -> NotificationType.reset_frequency_to_default - Store sent_at per channel instead of once per notification, stored in new NotificationChannel model (closes #16) Breaking changes: if you made custom channels, frequencies or notification types, than please check the renames above. For most users these renames won't be breaking changes.
* main: Improve email sending (#13) # Conflicts: # generic_notifications/channels.py # generic_notifications/digest.py # tests/test_channels.py
42e6288
to
d2e4df2
Compare
Show correct usage of the .prefetch() method in the readme
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a rather substantial refactor for DGN v2. The TL;DR is that the library now makes it a lot easier to have multiple channels that work with digests, like an SMS or Slack channel. And the sent_at status is now stored per channel instead of once per notification.
Improvements
sent_email_at
tracking with per-channel delivery status via a newNotificationChannel
model (closes Storeemail_sent_at
per channel #16)Breaking changes
Class renames
NotificationChannel
->BaseChannel
NotificationFrequency
->BaseFrequency
Model changes
EmailFrequency
model toNotificationFrequency
modelMethod renames
NotificationType.default_email_frequency
->NotificationType.default_frequency
NotificationType.set_email_frequency
->NotificationType.set_frequency
NotificationType.get_email_frequency
->NotificationType.get_frequency
NotificationType.reset_email_frequency_to_default
->NotificationType.reset_frequency_to_default
Command and function renames
send_digest_emails
command tosend_notification_digests
API changes
get_notification_preferences
function now returnsnotification_frequency
instead ofemail_frequency
process
method moved from individual channel implementations to theBaseChannel
class