aboutsummaryrefslogtreecommitdiff
path: root/wsgi.py
blob: 40c4473e5b5fddfaaac2ceb3115b39e403e607fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""Run the application"""

from qc_app import create_app, instance_path
from qc_app.check_connections import check_db, check_redis

def check_and_build_app():
    # Setup the app
    appl = create_app(instance_path())

    # Check connections
    check_db(appl.config["SQL_URI"])
    check_redis(appl.config["REDIS_URL"])
    return appl

app = check_and_build_app()

if __name__ == "__main__":
    # Run the app
    app.run()