-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
I'm trying to understand how swarm control work in noflo-nodejs.
Lines 19 to 34 in e698f7b
| exports.startGraph = (graphPath, runtime, settings) => exports | |
| .loadGraph({ | |
| graph: graphPath, | |
| }) | |
| .then((graphInstance) => { | |
| const graph = graphInstance; | |
| graph.name = graph.name || path.basename(graphPath, path.extname(graphPath)); | |
| const graphName = `${settings.namespace}/${graph.name}`; | |
| return runtime.graph.registerGraph(graphName, graph) | |
| .then(() => runtime // eslint-disable-line no-underscore-dangle | |
| .network._startNetwork(graph, graphName, 'none')) | |
| .then(() => { | |
| runtime.runtime.setMainGraph(graphName); | |
| return runtime; | |
| }); | |
| }); |
Here seems there is only one runtime in the nodejs server? And this singleton runtime will only have one main graph as setMainGraph is used.
So this make it seems that noflo-nodejs can only run a graph at one time, but it doesn't, so how does it do?
Background: I'm trying to run multiple graph at background in my app that embeds noflo.
Metadata
Metadata
Assignees
Labels
No labels