@shared_task
def forgot_email(subject,user_cipher,key_cipher,to):
print "comes here in the mail"
try:
email_content = {'user_cipher':user_cipher,'key_cipher': key_cipher}
message = render_to_string('forgot_password.txt',email_content)
send_mail(subject, message, settings.EMAIL,to, fail_silently=False)
except Exception,e:
print "Exception",e
except:
print 'exp'
@shared_task
def multiplesendmail(subject,body,first_name,to):
print "comes here in the mail"
try:
print 'subject',subject,'body',body,'first_name',first_name,'to',to
# email_content = {'first_name':first_name,'user_cipher':user_cipher,'key_cipher':key_cipher}
# message = render_to_string('email_verification.txt', email_content)
send_mail(subject,body,settings.EMAIL,to,fail_silently=False)
except Exception,e:
print "Exception",e
注:セロリを止めることなく新しいタスクを追加したいと思います。私はこの最初のストップセロリを使用しなければならないし、djangoセロリでセロリインスタンスを停止せずにセロリで新しいタスクを追加する方法は?
celery -A HealthBrio worker -l info