Пример #1
0
 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()
Пример #2
0
 def __init__(self, service='cmdb', progressid=''):
     self.__app = None
     settings = app_settings
     if service == 'cmdb':
         self.__app = CmdbApp(**settings)
     elif service == 'cmdb_cron':
         self.__app = CronApp(**settings)
     super(MyProgram, self).__init__(progressid)
     self.__app.start_server()
     tornado.ioloop.IOLoop.current().start()
Пример #3
0
 def __init__(self, service='mg_api', progressid=''):
     self.__app = None
     settings = app_settings
     if service == 'tools':
         self.__app = MyApp(**settings)
     elif service == 'cron_jobs':
         ### 日志查看、报警 都是定时
         self.__app = CronApp(**settings)
     super(MyProgram, self).__init__(progressid)
     self.__app.start_server()