mirror of
https://github.com/yldio/copilot.git
synced 2024-12-01 07:30:07 +02:00
feat(portal-api): ignore metrics for stopped instances
This commit is contained in:
parent
827379806b
commit
666a9ad1e8
@ -2005,6 +2005,10 @@ class Data extends EventEmitter {
|
|||||||
|
|
||||||
getMetricsForInstance (instance) {
|
getMetricsForInstance (instance) {
|
||||||
return ({ names, start, end }) => {
|
return ({ names, start, end }) => {
|
||||||
|
if (instance.status.toUpperCase() !== 'RUNNING') {
|
||||||
|
return Promise.resolve([]);
|
||||||
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const options = {
|
const options = {
|
||||||
deploymentGroupId: instance.deployment_group_id,
|
deploymentGroupId: instance.deployment_group_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user