mirror of
https://github.com/yldio/copilot.git
synced 2024-11-28 14:10:04 +02:00
style: lint
This commit is contained in:
parent
8717d19136
commit
8e56cb0ada
@ -26,7 +26,6 @@ const swaggerOptions = {
|
|||||||
const {
|
const {
|
||||||
DOCKER_HOST,
|
DOCKER_HOST,
|
||||||
DOCKER_CERT_PATH,
|
DOCKER_CERT_PATH,
|
||||||
DOCKER_CLIENT_TIMEOUT,
|
|
||||||
SDC_URL,
|
SDC_URL,
|
||||||
SDC_ACCOUNT,
|
SDC_ACCOUNT,
|
||||||
SDC_KEY_ID
|
SDC_KEY_ID
|
||||||
|
@ -885,7 +885,7 @@ module.exports = class Data extends EventEmitter {
|
|||||||
return cb(err);
|
return cb(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!services || !services.length) {
|
if (!services || !services.length) {
|
||||||
return cb(null, null);
|
return cb(null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1002,7 +1002,7 @@ module.exports = class Data extends EventEmitter {
|
|||||||
return next(err);
|
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);
|
container.stop(next);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -1038,7 +1038,7 @@ module.exports = class Data extends EventEmitter {
|
|||||||
return next(err);
|
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);
|
container.start(next);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -1074,7 +1074,7 @@ module.exports = class Data extends EventEmitter {
|
|||||||
return next(err);
|
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);
|
container.restart(next);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -1112,7 +1112,7 @@ module.exports = class Data extends EventEmitter {
|
|||||||
return next(err);
|
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?
|
// Use force in case the container is running. TODO: should we keep force?
|
||||||
container.remove({ force: true }, next);
|
container.remove({ force: true }, next);
|
||||||
});
|
});
|
||||||
@ -1220,7 +1220,7 @@ module.exports = class Data extends EventEmitter {
|
|||||||
|
|
||||||
VAsync.forEachParallel({
|
VAsync.forEachParallel({
|
||||||
func: (instance, next) => {
|
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);
|
container.stop(next);
|
||||||
},
|
},
|
||||||
inputs: instances
|
inputs: instances
|
||||||
@ -1246,7 +1246,7 @@ module.exports = class Data extends EventEmitter {
|
|||||||
|
|
||||||
VAsync.forEachParallel({
|
VAsync.forEachParallel({
|
||||||
func: (instance, next) => {
|
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) => {
|
container.start((err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
return next(err);
|
return next(err);
|
||||||
@ -1286,7 +1286,7 @@ module.exports = class Data extends EventEmitter {
|
|||||||
VAsync.forEachParallel({
|
VAsync.forEachParallel({
|
||||||
func: (instance, next) => {
|
func: (instance, next) => {
|
||||||
this.updateInstance({ id: instance.id, status: 'RESTARTING' }, () => {
|
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);
|
container.restart(next);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user