Add DD monitoring for simultaneous server connections

This commit is contained in:
Tom Moor
2023-04-27 21:48:51 -04:00
parent 4dade03c33
commit 0f8c444af0
2 changed files with 25 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
import Queue from "bull";
import { snakeCase } from "lodash";
import { Second } from "@shared/utils/time";
import env from "@server/env";
import Metrics from "@server/logging/Metrics";
import Redis from "../redis";
@@ -55,7 +56,7 @@ export function createQueue(
setInterval(async () => {
Metrics.gauge(`${prefix}.count`, await queue.count());
Metrics.gauge(`${prefix}.delayed_count`, await queue.getDelayedCount());
}, 5 * 1000);
}, 5 * Second);
}
ShutdownHelper.add(name, ShutdownOrder.normal, async () => {