Commit 88f5453b authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Set async_trans flag directly within insert operation.

parent ea90966e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -90,10 +90,10 @@ class ImportExecutor(TaskExecutor):
                    cnode.setLocationId(locationId)
                    cnode.setCreatorID(self.userId)
                    cnode.setContentLength(0)
                    cnode.setAsyncTrans(True)
                    cnode.setSticky(True)

                    if self.dbConn.insertNode(cnode):
                        self.dbConn.setAsyncTrans(vospacePath, True)
                        now = dt.now()
                        nodeList.append([ now, dir, vospacePath, "container", "DONE" ])
                    else:
@@ -127,10 +127,10 @@ class ImportExecutor(TaskExecutor):
                    dnode.setCreatorID(self.userId)
                    dnode.setContentLength(os.path.getsize(file))
                    dnode.setContentMD5(self.md5calc.getMD5(file))
                    dnode.setAsyncTrans(True)
                    dnode.setSticky(True)

                    if self.dbConn.insertNode(dnode):
                        self.dbConn.setAsyncTrans(vospacePath, True)
                        now = dt.now()
                        nodeList.append([ now, file, vospacePath, "data", "DONE" ])
                    else:
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ class Node(object):
        self.type = type
        self.locationId = None
        self.format = None
        self.asyncTrans = None
        self.asyncTrans = False
        self.sticky = False
        self.busyState = None
        self.creatorID = None