1 Star 0 Fork 69

houge/codo-admin

forked from opendevops/codo-admin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
startup.py 867 Bytes
一键复制 编辑 原始数据 按行查看 历史
shenshuo 提交于 2018-12-22 16:56 . 更新readme
#!/usr/bin/env python
# -*-coding:utf-8-*-
"""
author : shenshuo
date : 2017年11月14日20:11:27
role : 启动程序
"""
import fire
from tornado.options import define
from websdk.program import MainProgram
from settings import settings as app_settings
from mg.applications import Application as MgApp
from mg.subscribe import RedisSubscriber as SubApp
define("service", default='api', help="start service flag", type=str)
class MyProgram(MainProgram):
def __init__(self, service='mg_api', progressid=''):
self.__app = None
settings = app_settings
if service == 'mg':
self.__app = MgApp(**settings)
elif service == 'sub_log':
self.__app = SubApp(**settings)
super(MyProgram, self).__init__(progressid)
self.__app.start_server()
if __name__ == '__main__':
fire.Fire(MyProgram)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/houchangyu/codo-admin.git
git@gitee.com:houchangyu/codo-admin.git
houchangyu
codo-admin
codo-admin
master

搜索帮助