blob: ff24d78159c93ca3ae08b01e36aa76d8d9587c3b (
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
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()
# 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()
|