Skip to content

Conversation

@Ostap-Zherebetskyi
Copy link
Collaborator

@Ostap-Zherebetskyi Ostap-Zherebetskyi commented Nov 27, 2025

Purpose

refactor notification subscriptions and digest handling

Changes

TBD

QA Notes

TBD

Documentation

TBD

Side Effects

TBD

Ticket

https://openscience.atlassian.net/browse/ENG-9762
https://openscience.atlassian.net/browse/ENG-9758

@Ostap-Zherebetskyi Ostap-Zherebetskyi marked this pull request as ready for review November 27, 2025 13:08
Copy link
Collaborator

@cslzchen cslzchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

)
except NotificationSubscription.MultipleObjectsReturned:
pass
if not isinstance(resource, Preprint):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why only exclude Preprints?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prior to the NR, we excluded the preprint. This piece was simply lost during the NR.

subscribe_user_to_notifications(node, node.creator)

if isinstance(node, Preprint):

)
except NotificationSubscription.MultipleObjectsReturned:
pass
if not isinstance(resource, Preprint):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

DESK_REQUEST_EXPORT = 'desk_request_export'
DESK_REQUEST_DEACTIVATION = 'desk_request_deactivation'
DESK_OSF_SUPPORT_EMAIL = 'desk_osf_support_email'
DESK_OSF_SUPPORT_EMAIL = 'desk_osf_support_email' # unused same as DESK_CROSSREF_ERROR
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, we need another ticket to review all unused types. We found bugs where we used the wrong types which led to the correct ones unused.

subscription=self,
event_context=event_context
event_context=event_context,
sent=None if self.message_frequency != 'none' else timezone.now(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, this is a temporary solution to avoid adding migrations. We need post-release improvements to be able to distinguish between none frequency sent vs actual sent.

@cslzchen cslzchen changed the title [ENG-9759][ENG-9762][ENG-9758] refactor notification subscriptions and digest handling [ENG-9762][ENG-9758] refactor notification subscriptions and digest handling Nov 27, 2025
@cslzchen cslzchen merged commit 1e812ee into CenterForOpenScience:feature/notification-refactor-p2-s Nov 27, 2025
8 checks passed
@cslzchen cslzchen changed the title [ENG-9762][ENG-9758] refactor notification subscriptions and digest handling [ENG-9762] [ENG-9758] Refactor notification subscriptions and digest handling Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants