mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Only save settings once during node load process
This commit is contained in:
parent
8d9b6dd859
commit
0117df0960
@ -143,6 +143,12 @@ function loadModuleFiles(modules) {
|
|||||||
return loadNodeSetList(pluginList);
|
return loadNodeSetList(pluginList);
|
||||||
}).then(function() {
|
}).then(function() {
|
||||||
return loadNodeSetList(nodeList);
|
return loadNodeSetList(nodeList);
|
||||||
|
}).then(function () {
|
||||||
|
if (settings.available()) {
|
||||||
|
return registry.saveNodeList();
|
||||||
|
} else {
|
||||||
|
return
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -436,7 +442,7 @@ async function loadPlugin(plugin) {
|
|||||||
return plugin;
|
return plugin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let invocation = 0
|
||||||
function loadNodeSetList(nodes) {
|
function loadNodeSetList(nodes) {
|
||||||
var promises = [];
|
var promises = [];
|
||||||
nodes.forEach(function(node) {
|
nodes.forEach(function(node) {
|
||||||
@ -451,13 +457,7 @@ function loadNodeSetList(nodes) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return Promise.all(promises).then(function() {
|
return Promise.all(promises)
|
||||||
if (settings.available()) {
|
|
||||||
return registry.saveNodeList();
|
|
||||||
} else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function addModule(module) {
|
function addModule(module) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user