1 Star 0 Fork 45

BossDing-2020/codo-cmdb

forked from opendevops/codo-cmdb 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
startup.py 947 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/4/17 9:52
# @Author : Fred Yangxiaofei
# @File : startup.py
# @Role : 启动脚本
import fire
from tornado.options import define
from websdk.program import MainProgram
from settings import settings as app_settings
from biz.applications import Application as CmdbApp
from biz.crontab_app import Application as CronApp
define("service", default='api', help="start service flag", type=str)
class MyProgram(MainProgram):
def __init__(self, service='cmdb_api', progress_id='cmdb'):
self.__app = None
settings = app_settings
if service == 'cmdb':
self.__app = CmdbApp(**settings)
elif service == 'cron_app':
self.__app = CronApp(**settings)
super(MyProgram, self).__init__(progress_id)
self.__app.start_server()
if __name__ == '__main__':
fire.Fire(MyProgram)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/BossDing/codo-cmdb.git
git@gitee.com:BossDing/codo-cmdb.git
BossDing
codo-cmdb
codo-cmdb
master

搜索帮助