Ejemplo n.º 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()
Ejemplo n.º 2
0
class MyProgram(MainProgram):
    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()
Ejemplo n.º 3
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()
Ejemplo n.º 4
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()