Skip to content

Instantly share code, notes, and snippets.

@aavrug
Created December 22, 2017 07:54
Show Gist options
  • Save aavrug/d326e7b11e07e9a7d45c5ad606819fc1 to your computer and use it in GitHub Desktop.
Save aavrug/d326e7b11e07e9a7d45c5ad606819fc1 to your computer and use it in GitHub Desktop.
# Create your tasks here
from __future__ import absolute_import, unicode_literals
from celery import shared_task
from mailer import Mailer
@shared_task
def sendMail(email):
mail = Mailer()
mail.send_messages(subject='My App account verification',
template='emails/customer_verification.html',
context='',
to_emails=[email])
@shared_task
def add(x, y):
return x + y
@shared_task
def mul(x, y):
return x * y
@shared_task
def xsum(numbers):
return sum(numbers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment