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

Refactor notifications queue #94

Merged
merged 1 commit into from
Sep 5, 2018
Merged

Conversation

kfdm
Copy link
Collaborator

@kfdm kfdm commented Jul 26, 2018

  • Refactors NotificationBase to be concerned only with sending the
    message. Notifications now have no knowledge of the celery queue
    or Project/Service models

  • Alert model handles expanding alert json based on Project/Service
    model but has no knowledge about about configured sender plugins

  • Incoming alerts are saved to the database for auditing purposes and
    queued to be processed

  • Processing alerts expands the alert data, and de-duplicates sender
    targets before queuing to be sent

@codecov-io
Copy link

codecov-io commented Jul 26, 2018

Codecov Report

Merging #94 into master will decrease coverage by 0.09%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #94     +/-   ##
=========================================
- Coverage   47.26%   47.16%   -0.1%     
=========================================
  Files          76       77      +1     
  Lines        2503     2508      +5     
=========================================
  Hits         1183     1183             
- Misses       1320     1325      +5
Impacted Files Coverage Δ
notification/user.py 55.17% <0%> (-12.83%) ⬇️
notification/__init__.py 79.16% <0%> (-3.38%) ⬇️
views.py 43.42% <0%> (-0.07%) ⬇️
admin.py 0% <0%> (ø) ⬆️
migrations/0003_alert_queue.py 100% <0%> (ø)
models.py 25.97% <0%> (+3.67%) ⬆️
tasks.py 100% <0%> (+12.5%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4e2d559...85c7ea8. Read the comment docs.

* Refactors NotificationBase to be concerned only with sending the
  message. Notifications now have no knowledge of the celery queue
  or Project/Service models
* Alert model handles expanding alert json based on Project/Service
  model but has no knowledge about about configured sender plugins

* Incoming alerts are saved to the database for auditing purposes and
  queued to be processed
* Processing alerts expands the alert data, and de-duplicates sender
  targets before queuing to be sent
@kfdm kfdm merged commit ed68f90 into line:master Sep 5, 2018
@kfdm kfdm deleted the alert-queue-refactor branch September 5, 2018 02:34
kfdm added a commit to kfdm/promgen that referenced this pull request Sep 25, 2018
Combined with the new notifier queue in line#94 add a prune command so we
can avoid having our database grow too much
kfdm added a commit to kfdm/promgen that referenced this pull request Sep 25, 2018
Combined with the new notifier queue in line#94 add a prune command so we
can avoid having our database grow too much
@kfdm kfdm mentioned this pull request Sep 25, 2018
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