Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Add send email task to task service#152

Merged
joseph-sentry merged 2 commits intomainfrom
joseph/send-email
Oct 10, 2023
Merged

Add send email task to task service#152
joseph-sentry merged 2 commits intomainfrom
joseph/send-email

Conversation

@joseph-sentry
Copy link
Copy Markdown
Contributor

@joseph-sentry joseph-sentry commented Sep 21, 2023

Purpose/Motivation

The API should be able to enqueue a task to send an email to a user.

Links to relevant tickets

Fixes: codecov/engineering-team#158

What does this PR do?

  • Creates a helper function to dispatch a send email task to the worker
    entry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 21, 2023

Codecov Report

Merging #152 (7bdbbf4) into main (8916978) will decrease coverage by 0.01%.
The diff coverage is 50.00%.

@@           Coverage Diff           @@
##            main    #152     +/-   ##
=======================================
- Coverage   95.47   95.46   -0.01     
=======================================
  Files        714     714             
  Lines      15312   15314      +2     
=======================================
+ Hits       14618   14619      +1     
- Misses       694     695      +1     
Flag Coverage Δ
unit 95.56% <50.00%> (-0.09%) ⬇️
unit-latest-uploader 95.56% <50.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
services/task/task.py 87.73% <50.00%> (-0.73%) ⬇️

@codecov-staging
Copy link
Copy Markdown

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Files Patch % Lines
services/task/task.py 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!.

@codecov-public-qa
Copy link
Copy Markdown

codecov-public-qa Bot commented Sep 21, 2023

Codecov Report

Merging #152 (7bdbbf4) into main (8916978) will decrease coverage by 0.01%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #152      +/-   ##
==========================================
- Coverage   95.56%   95.56%   -0.01%     
==========================================
  Files         599      599              
  Lines       14911    14913       +2     
==========================================
+ Hits        14250    14251       +1     
- Misses        661      662       +1     
Flag Coverage Δ
unit 95.56% <50.00%> (-0.01%) ⬇️
unit-latest-uploader 95.56% <50.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
services/task/task.py 83.01% <50.00%> (-0.64%) ⬇️

Impacted file tree graph

@joseph-sentry joseph-sentry marked this pull request as ready for review September 25, 2023 14:55
Comment thread services/task/task.py Outdated
),
).apply_async()

def send_email(self, ownerid, template_name, from_addr, subject, **kwargs):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some type annotations might be nice here

@codecov-qa
Copy link
Copy Markdown

codecov-qa Bot commented Oct 9, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (8916978) 95.56% compared to head (7bdbbf4) 95.56%.

Files Patch % Lines
services/task/task.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #152      +/-   ##
==========================================
- Coverage   95.56%   95.56%   -0.01%     
==========================================
  Files         599      599              
  Lines       14911    14913       +2     
==========================================
+ Hits        14250    14251       +1     
- Misses        661      662       +1     
Flag Coverage Δ
unit 95.56% <50.00%> (-0.01%) ⬇️
unit-latest-uploader 95.56% <50.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joseph-sentry joseph-sentry merged commit 0741b80 into main Oct 10, 2023
@joseph-sentry joseph-sentry deleted the joseph/send-email branch October 10, 2023 11:59
RulaKhaled pushed a commit that referenced this pull request Oct 12, 2023
* Add send email task to task service

* Add type annotations to send_email function args

Signed-off-by: joseph-sentry <[email protected]>
RulaKhaled pushed a commit that referenced this pull request Oct 12, 2023
* Add send email task to task service

* Add type annotations to send_email function args

Signed-off-by: joseph-sentry <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Api can send emails via Worker

2 participants