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

Add a notification queue handled by at least one separate background process #359

Open
Tracked by #121
hmpf opened this issue Mar 4, 2022 · 1 comment
Open
Tracked by #121
Labels
enhancement New feature or request notification Affects the notification system queue

Comments

@hmpf
Copy link
Contributor

hmpf commented Mar 4, 2022

The MediumClass.send() static method takes an event and notification profile and **kwargs. It runs in a new process per event.

The procedure is currently:

  1. Incident is received.
  2. NotificationProfiles are checked to see if there should be sent any notifications, signature NotificationProfile().incident_fits(incident).
  3. In the same loop of profiles, a function sends the notification, signature send_notification(event, profile)
  4. In the same loop, which notification media are available is checked
  5. In the same loop, a new loop starts to send to a specific medium
  6. Return to 1

Instead:

  1. On startup, which notification media are installed is checked and cached
  2. Incident/event is received.
  3. NotificationProfiles are checked to see if there should be sent any notifications. Signature: NotificationProfile.objects.incident_fits(incident)
  4. The event and media (destination) is put on a queue
  5. A background/different process reads from the queue and sends the notifications
  6. Return to 2

This will make it easier to speak to an external notification sender as well. One connection per medium instead of profile x medium connections.

@hmpf hmpf changed the title Add a queue and a background process per media Add a queue used by at least one separate background process Mar 4, 2022
@hmpf hmpf changed the title Add a queue used by at least one separate background process Add a notification queue handled by at least one separate background process Mar 4, 2022
@hmpf hmpf added queue enhancement New feature or request notification Affects the notification system labels Sep 8, 2022
@lunkwill42
Copy link
Member

#400 deals with the initial implementation of queuing for this

@github-project-automation github-project-automation bot moved this to 📋 Backlog in HTMXify Argus Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request notification Affects the notification system queue
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants