Skip to content

Commit

Permalink
added celery task to apis to send email initation
Browse files Browse the repository at this point in the history
  • Loading branch information
ami-wtag committed Mar 3, 2024
1 parent 6e1d864 commit 8b14c2d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/api/invitation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 8b14c2d

Please sign in to comment.