-
Notifications
You must be signed in to change notification settings - Fork 2
/
manage.py
46 lines (31 loc) · 698 Bytes
/
manage.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from flask_script import Manager
from tcas import create_tcas
from tcas.db import initialize_model
from tcas.db import reset_model
application = create_tcas()
manager = Manager(application)
@manager.command
def run():
"""Run application.
"""
application.run(debug=True)
@manager.command
def test():
"""Run application.
"""
application.run(debug=True)
@manager.command
def reboot():
"""Reset and reboot application."""
reset()
initialize()
@manager.command
def initialize():
"""Initialize database."""
initialize_model()
@manager.command
def reset():
"""Reset database."""
reset_model()
if __name__ == '__main__':
manager.run()