fix(portal-api): fix branch health resolution

This commit is contained in:
Sérgio Ramos 2017-09-05 22:22:41 +01:00
parent a6abc105a9
commit fcd0e2820a

View File

@ -201,6 +201,7 @@ module.exports = class ContainerPilotWatcher extends Events {
const status = JSON.parse(payload); const status = JSON.parse(payload);
next(null, status); next(null, status);
} catch (err) { } catch (err) {
this.emit('error', err);
next(); next();
} }
}); });
@ -368,8 +369,8 @@ module.exports = class ContainerPilotWatcher extends Events {
} }
const almostJobNameRegexp = new RegExp(`${name}-.*`); const almostJobNameRegexp = new RegExp(`${name}-.*`);
const almostServiceJobs = jobNames.filter((n) => { const almostServiceJobs = jobNames.filter(({ Name }) => {
return almostJobNameRegexp.test(n); return almostJobNameRegexp.test(Name);
}); });
if (almostServiceJobs.length) { if (almostServiceJobs.length) {