Skip to content

Commit 64a6c07

Browse files
committed
Polishing
1 parent d86855e commit 64a6c07

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/CloudGraphsDFG/services/CloudGraphsDFG.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,8 @@ function getAdjacencyMatrix(dfg::CloudGraphsDFG)::Matrix{Union{Nothing, Symbol}}
791791
loadtx = transaction(dfg.neo4jInstance.connection)
792792
query = "START n=node(*) MATCH (n:VARIABLE:$(dfg.userId):$(dfg.robotId):$(dfg.sessionId))-[r:FACTORGRAPH]-(m:FACTOR:$(dfg.userId):$(dfg.robotId):$(dfg.sessionId)) RETURN n.label as variable, m.label as factor;"
793793
nodes = loadtx(query; submit=true)
794+
# Have to finish the transaction
795+
commit(loadtx)
794796
if length(nodes.errors) > 0
795797
error(string(nodes.errors))
796798
end
@@ -800,13 +802,7 @@ function getAdjacencyMatrix(dfg::CloudGraphsDFG)::Matrix{Union{Nothing, Symbol}}
800802
for i = 1:length(varRel)
801803
adjMat[fDict[factRel[i]], vDict[varRel[i]]] = factRel[i]
802804
end
803-
# Have to finish the transaction
804-
commit(loadtx)
805805

806-
# for (fIndex, factLabel) in enumerate(factLabels)
807-
# factVars = getNeighbors(dfg, getFactor(dfg, factLabel))
808-
# map(vLabel -> adjMat[fIndex+1,vDict[vLabel]] = factLabel, factVars)
809-
# end
810806
return adjMat
811807
end
812808

0 commit comments

Comments
 (0)