1
0
mirror of https://github.com/yldio/copilot.git synced 2024-12-29 05:10:05 +02:00

feat(portal-api): ignore metrics for stopped instances

This commit is contained in:
Sérgio Ramos 2017-08-30 11:56:42 +01:00
parent 827379806b
commit 666a9ad1e8

View File

@ -2005,6 +2005,10 @@ class Data extends EventEmitter {
getMetricsForInstance (instance) {
return ({ names, start, end }) => {
if (instance.status.toUpperCase() !== 'RUNNING') {
return Promise.resolve([]);
}
return new Promise((resolve, reject) => {
const options = {
deploymentGroupId: instance.deployment_group_id,