mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 11:01:52 +00:00
Gracefully handle plugin versions check if one plugin causes an error
This commit is contained in:
parent
d3cdd0703b
commit
ea2473f0a3
1 changed files with 7 additions and 2 deletions
|
@ -260,11 +260,16 @@ module.exports.pluginHandler = function (parent) {
|
||||||
parent.db.getPlugins(function(err, plugins) {
|
parent.db.getPlugins(function(err, plugins) {
|
||||||
var proms = [];
|
var proms = [];
|
||||||
plugins.forEach(function(curconf) {
|
plugins.forEach(function(curconf) {
|
||||||
proms.push(obj.getPluginConfig(curconf.configUrl));
|
proms.push(obj.getPluginConfig(curconf.configUrl).catch(e => { return null; } ));
|
||||||
});
|
});
|
||||||
var latestRet = [];
|
var latestRet = [];
|
||||||
Promise.all(proms).then(function(newconfs) {
|
Promise.all(proms).then(function(newconfs) {
|
||||||
newconfs.forEach(function(newconf) {
|
var nconfs = [];
|
||||||
|
// filter out config download issues
|
||||||
|
newconfs.forEach(function(nc) {
|
||||||
|
if (nc !== null) nconfs.push(nc);
|
||||||
|
});
|
||||||
|
nconfs.forEach(function(newconf) {
|
||||||
var curconf = null;
|
var curconf = null;
|
||||||
plugins.forEach(function(conf) {
|
plugins.forEach(function(conf) {
|
||||||
if (conf.configUrl == newconf.configUrl) curconf = conf;
|
if (conf.configUrl == newconf.configUrl) curconf = conf;
|
||||||
|
|
Loading…
Reference in a new issue