예제 #1
0
 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)
예제 #3
0
 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)
예제 #4
0
 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)
예제 #5
0
 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)
예제 #7
0
 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)