Skip to content

Conversation

@shurwit
Copy link
Collaborator

@shurwit shurwit commented Feb 26, 2025

Description

Please provide a summary of the pull request and the issue it resolves. Please add necessary details, context, dependencies, explanation of when review is needed (see next section), etc.

Hi @petyos, we ran into this issue when attempting to use the scheduled notifications for one of our customers so I thought I would open a PR on the main repo too. At a high level I am trying to delay calculating the list of recipients for a scheduled notification until it is time to send out the notification rather than right when it is first scheduled.

To do this, I created a new type of queue item that does not contain recipient details but has a flag instead telling the queue to compute the topic/criteria recipients for the notification when the queue item is processed. It will then insert all of the normal queue items and recipient data and retrigger the queue.

No rush as I have already merged these changes into our fork, but let me know if you have any questions or see any issues when you get a chance. Thanks!

Resolves #190

Review Time Estimate

Please give your idea of how soon this pull request needs to be reviewed by selecting one of the options below. This can be based on the criticality of the issue at hand and/or other relevant factors.

  • Immediately
  • Within a week
  • When possible

Type of changes

Please select a relevant option:

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Other (any another change that does not fall in one of the above categories.)

Checklist:

Please select all applicable options:

  • I have signed the Rokwire Contributor License Agreement (CLA). (Any contributor who is not an employee of the University of Illinois whose official duties include contributing to the Rokwire software, or who is not paid by the Rokwire project, needs to sign the CLA before their contribution can be accepted.)
  • I have updated the CHANGELOG.
  • I have read the Contributor Guidelines.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My change requires updating the documentation.
  • I have made necessary changes to the documentation.
  • I have added tests related to my changes.
  • My changes generate no new warnings.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

@shurwit shurwit requested a review from petyos February 26, 2025 21:57
@shurwit shurwit requested a review from mdryankov as a code owner February 26, 2025 21:57
@shurwit shurwit linked an issue Feb 26, 2025 that may be closed by this pull request
Copy link
Collaborator

@petyos petyos left a comment

Choose a reason for hiding this comment

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

Hi @shurwit , it looks good, thanks. The issue I see is that the build fails.

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.

[BUG] Scheduled notifications calculate recipients immediately

3 participants