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

Commit 0741b80

Browse files
Add send email task to task service (#152)
* Add send email task to task service * Add type annotations to send_email function args Signed-off-by: joseph-sentry <[email protected]>
1 parent 8916978 commit 0741b80

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

services/task/task.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,3 +367,17 @@ def preprocess_upload(self, repoid, commitid, report_code):
367367
report_code=report_code,
368368
),
369369
)
370+
371+
def send_email(
372+
self, ownerid, template_name: str, from_addr: str, subject: str, **kwargs
373+
):
374+
self._create_signature(
375+
"app.tasks.send_email.SendEmail",
376+
kwargs=dict(
377+
ownerid=ownerid,
378+
template_name=template_name,
379+
from_addr=from_addr,
380+
subject=subject,
381+
**kwargs,
382+
),
383+
).apply_async()

0 commit comments

Comments
 (0)