Commit 435b6022 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Set 'jobId' field on db for busy VOSpace nodes.

parent 801d175b
Loading
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -105,6 +105,7 @@ class ImportExecutor(TaskExecutor):
                            vospacePath = parentPath + '/' + nodeName
                        cnode.setParentPath(parentPath)
                        cnode.setLocationId(locationId)
                        cnode.setJobId(self.jobId)
                        cnode.setCreatorId(self.userId)
                        cnode.setContentLength(0)
                        cnode.setAsyncTrans(True)
@@ -135,6 +136,7 @@ class ImportExecutor(TaskExecutor):
                        vospacePath = parentPath + '/' + nodeName
                        dnode.setParentPath(parentPath)
                        dnode.setLocationId(locationId)
                        dnode.setJobId(self.jobId)
                        dnode.setCreatorId(self.userId)
                        dnode.setContentLength(os.path.getsize(file))
                        dnode.setContentMD5(self.md5calc.getMD5(file))
@@ -168,6 +170,10 @@ class ImportExecutor(TaskExecutor):
            m.addRecipient(self.adminEmail)

            if status == "OK":
                for node in self.nodeList:
                    vospacePath = node[2]
                    if node[-1] == "DONE":
                        self.dbConn.setJobId(vospacePath, None)
                timestamp = datetime.datetime.now().strftime("%Y_%m_%d-%H_%M_%S")
                nodeListFile = os.path.join(self.resDir, "vos_import_report-" + timestamp)
                try: