Skip to content

Commit

Permalink
delay the sending of the mail for 10 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitriovski Donald committed Dec 1, 2021
1 parent c9429d5 commit dd29e1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mailqueue/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ def send_mail(self):

if getattr(settings, 'MAILQUEUE_CELERY', defaults.MAILQUEUE_CELERY):
from mailqueue.tasks import send_mail
send_mail.delay(self.pk)
# send_mail.delay(self.pk) # in favor of the
send_mail.apply_async(args=[self.pk], countdown=10)
else:
self._send()

Expand Down

1 comment on commit dd29e1f

@DonExo
Copy link

@DonExo DonExo commented on dd29e1f Dec 1, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.