Beispiel #1
0
 def process(self):
    try :
         db_conf = self.conf.get_db_conf()
         db = MysqlTools(db_conf)
         taskInfoModule = TaskinfoModule(db)
         # 1 启动
         try :
             taskList = taskInfoModule.getAll()
             for taskinfo in taskList:
                 self.process_action(taskinfo)
             time.sleep(30)
         except Exception,e:
             log = str(e)
             self.logger.error(log)
             time.sleep(30)
         if db :
             db.close()
Beispiel #2
0
 def __getDb(self):
     db_conf = self.conf.get_db_conf()
     db = MysqlTools(db_conf)
     return db
Beispiel #3
0
    def vmDiskOk(self, json_msg):
        """
        @summary: 任务执行结果
        @param:json_msg 消息内容
        """
        pass

    def vmDiskError(self, json_msg):
        """
        @summary: 任务执行结果
        @param:json_msg 消息内容
        """
        pass


if __name__ == "__main__":

    conf = ConfigManage()
    db_conf = conf.get_db_conf()
    db = MysqlTools(db_conf)

#    aa = VmnetModule(db)
#    print aa.getById('f0cf6774954711e49109fe5400e41488')
#
#
#    tim_param = {}
#    tim_param['proxyIP'] = '1.1.2.1'
#    tim_param['proxyPort'] = '8009'
#    tim_param['netId'] = 'f0cf6774954711e49109fe5400e41488'
#    print aa.update(tim_param)