From 8b14c2d1bc37a77037ab9ed864d12750c8109e22 Mon Sep 17 00:00:00 2001 From: amirul-wd <155528891+amirul-wd@users.noreply.github.com> Date: Sun, 3 Mar 2024 17:18:45 +0600 Subject: [PATCH] added celery task to apis to send email initation --- app/api/invitation.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/api/invitation.py b/app/api/invitation.py index 4f00427..a4d0811 100644 --- a/app/api/invitation.py +++ b/app/api/invitation.py @@ -54,8 +54,7 @@ def invite( _ = invitation_crud.create(db=db, obj_in=new_invitation) try: - send_email_background( - background_tasks=background_tasks, + send_email_task.delay( subject=f'Invitation to Join {invitation_data.organization}', email_to=invitation_data.email, body={ @@ -115,7 +114,6 @@ async def resend_invitation( invitation.resent_count += 1 _ = invitation_crud.update(db=db, obj_in=invitation) - # Inside your FastAPI route send_email_task.delay( subject=f'Invitation to Join {invitation.organization}', email_to=invitation.email,