예제 #1
0
파일: executor.py 프로젝트: joshuabhk/toil
 def shutdown(self, driver):
     log.critical("Shutting down executor...")
     for taskId, pid in self.runningTasks.items():
         self.killTask(driver, taskId)
     Resource.cleanSystem()
     AbstractBatchSystem.workerCleanup(self.workerCleanupInfo)
     log.critical("Executor shut down")
예제 #2
0
    def shutdown(self):
        """
        Cleanly terminate worker threads. Add sentinels to inputQueue equal to maxThreads. Join
        all worker threads.
        """
        # Remove reference to inputQueue (raises exception if inputQueue is used after method call)
        inputQueue = self.inputQueue
        self.inputQueue = None
        for i in xrange(self.numWorkers):
            inputQueue.put(None)

        for thread in self.workerThreads:
            thread.join()
        AbstractBatchSystem.workerCleanup(self.workerCleanupInfo)
예제 #3
0
    def shutdown(self):
        """
        Cleanly terminate worker threads. Add sentinels to inputQueue equal to maxThreads. Join
        all worker threads.
        """
        # Remove reference to inputQueue (raises exception if inputQueue is used after method call)
        inputQueue = self.inputQueue
        self.inputQueue = None
        for i in xrange(self.numWorkers):
            inputQueue.put(None)

        for thread in self.workerThreads:
            thread.join()
        AbstractBatchSystem.workerCleanup(self.workerCleanupInfo)