Conditions | 4 |
Total Lines | 14 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | """Quart development server with automatic restarts.""" |
||
10 | def run(): |
||
11 | while True: |
||
12 | try: |
||
13 | from memegen.settings import get_config |
||
14 | from memegen.factory import create_app |
||
15 | config = get_config(os.getenv('FLASK_ENV', 'local')) |
||
16 | app = create_app(config) |
||
17 | except Exception: |
||
18 | traceback.print_exc() |
||
19 | print() |
||
20 | time.sleep(3) |
||
21 | else: |
||
22 | app.run(debug=True) |
||
23 | break |
||
24 | |||
28 |