Skip to content
Snippets Groups Projects
Commit 5f6a140e authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Added 'cleanup()' method to clear the node list at the end of the operations.

parent b82eb573
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,9 @@ class RetrievePreprocessor(TaskExecutor): ...@@ -30,6 +30,9 @@ class RetrievePreprocessor(TaskExecutor):
self.nodeList = self.dbConn.getVOSpacePathList(vospacePath) self.nodeList = self.dbConn.getVOSpacePathList(vospacePath)
self.jobObj.jobInfo["nodeList"] = self.nodeList self.jobObj.jobInfo["nodeList"] = self.nodeList
def cleanup(self):
self.nodeList.clear()
def run(self): def run(self):
print("Starting retrieve preprocessor...") print("Starting retrieve preprocessor...")
self.setSourceQueueName("read_pending") self.setSourceQueueName("read_pending")
...@@ -41,4 +44,5 @@ class RetrievePreprocessor(TaskExecutor): ...@@ -41,4 +44,5 @@ class RetrievePreprocessor(TaskExecutor):
self.execute() self.execute()
self.destQueue.insertJob(self.jobObj) self.destQueue.insertJob(self.jobObj)
self.srcQueue.extractJob() self.srcQueue.extractJob()
self.cleanup()
print(f"Job {self.jobObj.jobId} MOVED from {self.srcQueue.name()} to {self.destQueue.name()}") print(f"Job {self.jobObj.jobId} MOVED from {self.srcQueue.name()} to {self.destQueue.name()}")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment