from celery import Celery

# from sqlalchemy import create_engine
# engine = create_engine(DATABASES)
from model_data_test import settings


from celery import Celery
app = Celery('model_data_test')
app.config_from_object('model_data_test.settings')
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)


# print(app)
# celery = Celery('tasks', broker='amqp://')
# celery.conf.CELERY_RESULT_BACKEND = os.environ.get('CELERY_RESULT_BACKEND', 'amqp')
#
# @celery.task(name='task.db_operation')
# def db_operation(id):
#     # 耗时的数据库操作
#     pass