Skip to content

Commit

Permalink
Add await for poller counters flush
Browse files Browse the repository at this point in the history
  • Loading branch information
nielm committed Dec 8, 2023
1 parent 6fc6e0e commit 1ed871e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/poller/poller-core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ exports.checkSpannerScaleMetricsPubSub = async (pubSubEvent, context) => {
log(`JSON payload`, {severity: 'ERROR', payload: payload});
Counters.incPollingFailedCounter();
} finally {
Counters.tryFlush();
await Counters.tryFlush();
}
};

Expand Down Expand Up @@ -608,7 +608,7 @@ exports.checkSpannerScaleMetricsHTTP = async (req, res) => {
res.end(err.toString());
Counters.incPollingFailedCounter();
} finally {
Counters.tryFlush();
await Counters.tryFlush();
}
};

Expand All @@ -630,7 +630,7 @@ exports.checkSpannerScaleMetricsJSON = async (payload) => {
log(`JSON payload`, {severity: 'ERROR', payload: payload});
Counters.incPollingFailedCounter();
} finally {
Counters.tryFlush();
await Counters.tryFlush();
}
};

Expand Down

0 comments on commit 1ed871e

Please sign in to comment.