2018-09-20 20:05:03 +00:00
|
|
|
# App initialization
|
|
|
|
from flask import Flask
|
2018-10-10 18:54:38 +00:00
|
|
|
from app.tasks.celery_configurator import make_celery
|
2018-09-20 20:05:03 +00:00
|
|
|
|
|
|
|
app = Flask(__name__, instance_relative_config=True)
|
|
|
|
app.config.from_object('config')
|
|
|
|
app.config.from_pyfile('config.py', silent=True)
|
2018-10-08 20:48:57 +00:00
|
|
|
app.config['MQTT_CLIENT_ID'] = app.config['MQTT_CLIENT_ID'] + '-worker'
|
2018-10-07 19:59:14 +00:00
|
|
|
task_builder = make_celery(app)
|
2018-10-10 18:54:38 +00:00
|
|
|
task_builder.autodiscover_tasks(['app.devices', 'app.accounts'])
|