<reponame>willnx/vlab_power<gh_stars>1-10
# -*- coding: UTF-8 -*-
from flask import Flask
from celery import Celery

from vlab_power_api.lib import const
from vlab_power_api.lib.views import PowerView, HealthView

app = Flask(__name__)
app.celery_app = Celery('power', backend='rpc://', broker=const.VLAB_MESSAGE_BROKER)
app.celery_app.conf.broker_heartbeat = 0 #https://github.com/celery/celery/issues/4895

HealthView.register(app)
PowerView.register(app)


if __name__ == '__main__':
    app.run(host="0.0.0.0", debug=True)
