blob: 0f246aaaea9037c61e801cb35a0efd720e1b78b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
"""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 application for running."""
# 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()
|