Created
September 16, 2017 05:51
-
-
Save yuriwoof/77aa24d30576d3af67338d062c02f28a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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