From 8e56cb0ada980335dee8528bd32204ec5bda9d74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Wed, 28 Jun 2017 11:23:43 +0100 Subject: [PATCH] style: lint --- packages/portal-api/server.js | 1 - packages/portal-data/lib/index.js | 16 ++++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/portal-api/server.js b/packages/portal-api/server.js index 78d94a67..038cc53f 100644 --- a/packages/portal-api/server.js +++ b/packages/portal-api/server.js @@ -26,7 +26,6 @@ const swaggerOptions = { const { DOCKER_HOST, DOCKER_CERT_PATH, - DOCKER_CLIENT_TIMEOUT, SDC_URL, SDC_ACCOUNT, SDC_KEY_ID diff --git a/packages/portal-data/lib/index.js b/packages/portal-data/lib/index.js index 6230fd7d..d9754e2d 100644 --- a/packages/portal-data/lib/index.js +++ b/packages/portal-data/lib/index.js @@ -885,7 +885,7 @@ module.exports = class Data extends EventEmitter { return cb(err); } - if (!services || !services.length) { + if (!services || !services.length) { return cb(null, null); } @@ -1002,7 +1002,7 @@ module.exports = class Data extends EventEmitter { return next(err); } - const container = this._docker.getContainer(instance.machine_id.split(/\-/)[0]); + const container = this._docker.getContainer(instance.machine_id.split(/-/)[0]); container.stop(next); }); }, @@ -1038,7 +1038,7 @@ module.exports = class Data extends EventEmitter { return next(err); } - const container = this._docker.getContainer(instance.machine_id.split(/\-/)[0]); + const container = this._docker.getContainer(instance.machine_id.split(/-/)[0]); container.start(next); }); }, @@ -1074,7 +1074,7 @@ module.exports = class Data extends EventEmitter { return next(err); } - const container = this._docker.getContainer(instance.machine_id.split(/\-/)[0]); + const container = this._docker.getContainer(instance.machine_id.split(/-/)[0]); container.restart(next); }); }, @@ -1112,7 +1112,7 @@ module.exports = class Data extends EventEmitter { return next(err); } - const container = this._docker.getContainer(instance.machine_id.split(/\-/)[0]); + const container = this._docker.getContainer(instance.machine_id.split(/-/)[0]); // Use force in case the container is running. TODO: should we keep force? container.remove({ force: true }, next); }); @@ -1220,7 +1220,7 @@ module.exports = class Data extends EventEmitter { VAsync.forEachParallel({ func: (instance, next) => { - const container = this._docker.getContainer(instance.machine_id.split(/\-/)[0]); + const container = this._docker.getContainer(instance.machine_id.split(/-/)[0]); container.stop(next); }, inputs: instances @@ -1246,7 +1246,7 @@ module.exports = class Data extends EventEmitter { VAsync.forEachParallel({ func: (instance, next) => { - const container = this._docker.getContainer(instance.machine_id.split(/\-/)[0]); + const container = this._docker.getContainer(instance.machine_id.split(/-/)[0]); container.start((err) => { if (err) { return next(err); @@ -1286,7 +1286,7 @@ module.exports = class Data extends EventEmitter { VAsync.forEachParallel({ func: (instance, next) => { this.updateInstance({ id: instance.id, status: 'RESTARTING' }, () => { - const container = this._docker.getContainer(instance.machine_id.split(/\-/)[0]); + const container = this._docker.getContainer(instance.machine_id.split(/-/)[0]); container.restart(next); }); },