mirror of
https://github.com/ptarmiganlabs/butler-sos.git
synced 2025-12-19 09:47:53 -05:00
Add error handling to user events interval callback
Co-authored-by: mountaindude <1029262+mountaindude@users.noreply.github.com>
This commit is contained in:
@@ -2285,10 +2285,16 @@ export function setupUdpQueueMetricsStorage() {
|
||||
);
|
||||
|
||||
intervalIds.userEvents = setInterval(async () => {
|
||||
globals.logger.verbose(
|
||||
'UDP QUEUE METRICS: Timer for storing user event queue metrics to InfluxDB triggered'
|
||||
);
|
||||
await postUserEventQueueMetricsToInfluxdb();
|
||||
try {
|
||||
globals.logger.verbose(
|
||||
'UDP QUEUE METRICS: Timer for storing user event queue metrics to InfluxDB triggered'
|
||||
);
|
||||
await postUserEventQueueMetricsToInfluxdb();
|
||||
} catch (err) {
|
||||
globals.logger.error(
|
||||
`UDP QUEUE METRICS: Error storing user event queue metrics to InfluxDB: ${err && err.stack ? err.stack : err}`
|
||||
);
|
||||
}
|
||||
}, writeFrequency);
|
||||
|
||||
globals.logger.info(
|
||||
|
||||
Reference in New Issue
Block a user