def submitCmdsAndWait(self, cmds, workers=1):
     """
     @Desc : FixME, httplib has issue if more than one thread submitted
     """
     if self.__asyncJobMgr is None:
         self.__asyncJobMgr = asyncJobMgr(self.__apiClient, self.__dbConnection)
     return self.__asyncJobMgr.submitCmdsAndWait(cmds, workers)
 def submitCmdsAndWait(self, cmds, workers=1):
     '''
     @Desc : FixME, httplib has issue if more than one thread submitted
     '''
     if self.__asyncJobMgr is None:
         self.__asyncJobMgr = asyncJobMgr(self.__apiClient,
                                          self.__dbConnection)
     return self.__asyncJobMgr.submitCmdsAndWait(cmds, workers)
 def submitJobs(self, jobs, nums_threads=10, interval=1):
     """
     @Desc :submit n jobs, execute them with nums_threads
            of threads
     """
     if self.__asyncJobMgr is None:
         self.__asyncJobMgr = asyncJobMgr(self.__apiClient, self.__dbConnection)
     self.__asyncJobMgr.submitJobs(jobs, nums_threads, interval)
 def submitJob(self, job, ntimes=1, nums_threads=10, interval=1):
     """
     @Desc : submit one job and execute the same job
             ntimes, with nums_threads of threads
     """
     if self.__asyncJobMgr is None:
         self.__asyncJobMgr = asyncJobMgr(self.__apiClient, self.__dbConnection)
     self.__asyncJobMgr.submitJobExecuteNtimes(job, ntimes, nums_threads, interval)
 def submitJobs(self, jobs, nums_threads=10, interval=1):
     '''
     @Desc :submit n jobs, execute them with nums_threads
            of threads
     '''
     if self.__asyncJobMgr is None:
         self.__asyncJobMgr = asyncJobMgr(self.__apiClient,
                                          self.__dbConnection)
     self.__asyncJobMgr.submitJobs(jobs, nums_threads, interval)
 def submitJob(self, job, ntimes=1, nums_threads=10, interval=1):
     '''
     @Desc : submit one job and execute the same job
             ntimes, with nums_threads of threads
     '''
     if self.__asyncJobMgr is None:
         self.__asyncJobMgr = asyncJobMgr(self.__apiClient,
                                          self.__dbConnection)
     self.__asyncJobMgr.submitJobExecuteNtimes(job, ntimes, nums_threads,
                                               interval)
 def submitCmdsAndWait(self, cmds, workers=1, apiclient=None):
     '''
     @Desc : FixME, httplib has issue if more than one thread submitted
     '''
     if not apiclient:
         apiclient = self.__apiClient
     if self.__asyncJobMgr is None:
         self.__asyncJobMgr = asyncJobMgr(apiclient,
                                          self.__dbConnection)
     return self.__asyncJobMgr.submitCmdsAndWait(cmds, workers)