-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathstartup.py
More file actions
31 lines (24 loc) · 769 Bytes
/
startup.py
File metadata and controls
31 lines (24 loc) · 769 Bytes
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Contact : 191715030@qq.com
Author : shenshuo
Date : 2019/1/21
Desc : 启动文件
"""
import fire
from tornado.options import define
from websdk2.program import MainProgram
from settings import settings as app_settings
from biz.applications import Application as configApi
define("service", default='api', help="start service flag", type=str)
class MyProgram(MainProgram):
def __init__(self, progress_id=''):
self.__app = None
settings = app_settings
self.__app = configApi(**settings)
super(MyProgram, self).__init__(progress_id)
self.__app.start_server()
if __name__ == '__main__':
fire.Fire(MyProgram)
# python3 startup.py --service=kerrigan --port=8030