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
1 changed files with 3 additions and 2 deletions

View File

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