Django-Celery-Email を使用しています。このアプリは、通常の「from django.core.mail import send_mail」でメールを送信するタスクを送信します。
send_mail タスクを呼び出すタスクを作成しましたが、サブタスクが完了したら、データベースで更新を行う必要があります。
これは私のtasks.pyです
from celery import task
@task()
def send_ad_contact_email():
from django.core.mail import send_mail
# Send the e.mail
send_mail('test subject', 'Here is the message.', 'somemail@gmail.com',
['tosomemail@gmail.com'], fail_silently=False)
# Update the email status on the model
# How can I know when send_mail(celery task) is done?
send_mail(セロリタスク)が完了したことを知るにはどうすればよいですか?
よろしくお願いします、