Create celery app object.

This commit is contained in:
Arik Fraimovich 2014-05-16 17:54:14 +03:00
parent 0cda4a6632
commit 4caf1ac3d3

View File

@ -4,9 +4,10 @@ import logging
from flask import Flask, make_response
from flask.ext.restful import Api
from flask_peewee.db import Database
import redis
from statsd import StatsClient
from celery import Celery
import events
from redash import settings, utils
@ -29,6 +30,11 @@ app = Flask(__name__,
static_folder=settings.STATIC_ASSETS_PATH,
static_path='/static')
celery = Celery('redash',
broker=settings.CELERY_BROKER,
include='redash.tasks')
celery.conf.update(CELERY_RESULT_BACKEND=settings.CELERY_BACKEND)
api = Api(app)
# configure our database