From fcd0e2820ab5df41fd649a66de785100b64a38ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Tue, 5 Sep 2017 22:22:41 +0100 Subject: [PATCH] fix(portal-api): fix branch health resolution --- packages/portal-api/lib/watch/container-pilot.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/portal-api/lib/watch/container-pilot.js b/packages/portal-api/lib/watch/container-pilot.js index 74fe3588..dc6a96a2 100644 --- a/packages/portal-api/lib/watch/container-pilot.js +++ b/packages/portal-api/lib/watch/container-pilot.js @@ -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) {