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

Set async_trans flag directly within insert operation.

parent ea90966e
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment