Commit 054d2da3 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Set 'destPathList' even on job error. This should prevent RetrieveCleaner process crash.

parent 1a6fb374
Loading
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -343,12 +343,6 @@ class RetrieveExecutor(TaskExecutor):

            self.jobObj.setResults(results)
            
            if status == ("OK"):
                self.jobObj.setPhase("COMPLETED")
                self.jobObj.setEndTime(datetime.datetime.now().isoformat())
                self.dbConn.insertJob(self.jobObj)
                self.logger.info("Job phase updated to COMPLETED.")
        
            # Add a list of physical destination paths for each VOSpace node in the node list
            self.logger.info("Generating physical destination paths for VOSpace nodes...")
            for vospacePath in self.nodeList:
@@ -361,6 +355,12 @@ class RetrieveExecutor(TaskExecutor):
                self.destPathList.append(destPath)
            self.jobObj.jobInfo["destPathList"] = self.destPathList.copy()

            if status == ("OK"):
                self.jobObj.setPhase("COMPLETED")
                self.jobObj.setEndTime(datetime.datetime.now().isoformat())
                self.dbConn.insertJob(self.jobObj)
                self.logger.info("Job phase updated to COMPLETED.")
        
                msg = f"""
        ########## VOSpace data retrieval procedure summary ##########