@@ -32,10 +32,14 @@ function CloudGraphsDFG{T}(neo4jConnection::Neo4j.Connection,
32
32
getPackedTypeFunc,
33
33
decodePackedTypeFunc,
34
34
rebuildFactorMetadata!;
35
- solverParams:: T = NoSolverParams ()) where T <: AbstractParams
35
+ solverParams:: T = NoSolverParams (),
36
+ createSessionNodes:: Bool = true ) where T <: AbstractParams
36
37
graph = Neo4j. getgraph (neo4jConnection)
37
38
neo4jInstance = Neo4jInstance (neo4jConnection, graph)
38
- return CloudGraphsDFG {T} (neo4jInstance, userId, robotId, sessionId, description, encodePackedTypeFunc, getPackedTypeFunc, decodePackedTypeFunc, rebuildFactorMetadata!, Symbol[], solverParams)
39
+ dfg = CloudGraphsDFG {T} (neo4jInstance, userId, robotId, sessionId, description, encodePackedTypeFunc, getPackedTypeFunc, decodePackedTypeFunc, rebuildFactorMetadata!, Symbol[], solverParams)
40
+ # Create the session if it doesn't already exist
41
+ createSessionNodes && createDfgSessionIfNotExist (dfg)
42
+ return dfg
39
43
end
40
44
"""
41
45
$(SIGNATURES)
@@ -53,9 +57,10 @@ function CloudGraphsDFG{T}(host::String,
53
57
getPackedTypeFunc,
54
58
decodePackedTypeFunc,
55
59
rebuildFactorMetadata!;
56
- solverParams:: T = NoSolverParams ()) where T <: AbstractParams
60
+ solverParams:: T = NoSolverParams (),
61
+ createSessionNodes:: Bool = true ) where T <: AbstractParams
57
62
neo4jConnection = Neo4j. Connection (host, port= port, user= dbUser, password= dbPassword);
58
- return CloudGraphsDFG {T} (neo4jConnection, userId, robotId, sessionId, description, encodePackedTypeFunc, getPackedTypeFunc, decodePackedTypeFunc, rebuildFactorMetadata!, solverParams= solverParams)
63
+ return CloudGraphsDFG {T} (neo4jConnection, userId, robotId, sessionId, description, encodePackedTypeFunc, getPackedTypeFunc, decodePackedTypeFunc, rebuildFactorMetadata!, solverParams= solverParams, createSessionNodes = createSessionNodes )
59
64
end
60
65
61
66
0 commit comments