Skip to content

Instantly share code, notes, and snippets.

@yuriwoof
Created September 16, 2017 05:51
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 yuriwoof/77aa24d30576d3af67338d062c02f28a to your computer and use it in GitHub Desktop.
Save yuriwoof/77aa24d30576d3af67338d062c02f28a to your computer and use it in GitHub Desktop.
from __future__ import absolute_import
from celery_flask import make_celery
from flask import Flask
from config import Config
config = Config()
flask_app = Flask(__name__)
flask_app.config.update(
CELERY_BROKER_URL=config.CELERY_BROKER_URL
)
celery = make_celery(flask_app)
@celery.task()
def add_together(a, b):
return a + b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment