Skip to content

Instantly share code, notes, and snippets.

@sikaili99
Last active April 23, 2020 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sikaili99/e52968474db66e1498472723ac7f3732 to your computer and use it in GitHub Desktop.
Save sikaili99/e52968474db66e1498472723ac7f3732 to your computer and use it in GitHub Desktop.
from celery import task
from celery import shared_task
from sms_app.middleware import TwillioNotificationMiddleware
# We can have either registered task
@task(name='send-sms')
def send_sms_task(message,phone,dlivery_time,delivery_day):
TwillioNotificationMiddleware.process_sms(message,phone,dlivery_time,delivery_day)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment