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

#2172 - Push Celery Migration #2266

Draft
wants to merge 66 commits into
base: main
Choose a base branch
from
Draft

#2172 - Push Celery Migration #2266

wants to merge 66 commits into from

Conversation

k-macmillan
Copy link
Member

@k-macmillan k-macmillan commented Jan 23, 2025

Description

issue #2172

Changes in This PR

V2 Push Notifications

  • Update status code for service unauthorized from 401 to 203
  • Updated push notification flow:
    • Validates requests before queuing deliver_push and returns V2PushPayload dataclass.
    • Validated payload sent to deliver_push celery task

Celery Provider Tasks

  • Added deliver_push celery task to handle push notifications using vetext_client, instead of being handled directly by the API.
  • Formatting payload to send to Vetext happens before send_push_notification method using Vetext Client
  • Implemented retry logic with AutoRetryException for transient failures.

Config Updates

  • Registered app.celery.provider_tasks in Celery imports.
  • Routed deliver_push to SEND_EMAIL queue.

Internal REST API

  • Minor refactor: Combined jsonify imports.
  • Added /502 and /sleep endpoints for debugging.

Mobile App Registry

  • Improved error handling: Logs & raises when accessing unregistered apps.

How Has This Been Tested?

  • Deploy OK

Checklist

  • I have assigned myself to this PR
  • PR has an appropriate title: #9999 - What the thing does
  • PR has a detailed description, including links to specific documentation
  • I have added the appropriate labels to the PR.
  • I did not remove any parts of the template, such as checkboxes even if they are not used
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to any documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works. Testing guidelines
  • I have ensured the latest main is merged into my branch and all checks are green prior to review
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • The ticket was moved into the DEV test column when I began testing this change

@k-macmillan k-macmillan changed the title First pass #2172 - Push Celery Migration Jan 24, 2025
@k-macmillan k-macmillan self-assigned this Jan 24, 2025
k-macmillan and others added 23 commits January 24, 2025 13:55
…/test_push_notifications.py::TestValidations::test_required_fields
…-affairs/notification-api into 2172-push-retries
@MackHalliday MackHalliday self-assigned this Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants