コード例 #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)
コード例 #2
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)
コード例 #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)
コード例 #6
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)
コード例 #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)