From 417ea7ea343151eab061c1136f6e7b2db81a67ee Mon Sep 17 00:00:00 2001 From: Evgeny Smyshlyaev Date: Fri, 5 Apr 2019 09:46:25 +0300 Subject: [PATCH] Server info: number of task resolvers (#510) --- server/src/controllers/analytics_controller.ts | 4 ++++ server/src/index.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/server/src/controllers/analytics_controller.ts b/server/src/controllers/analytics_controller.ts index 69e9676..7627820 100644 --- a/server/src/controllers/analytics_controller.ts +++ b/server/src/controllers/analytics_controller.ts @@ -361,6 +361,10 @@ export function getQueueLength() { return analyticsService.queueLength; } +export function getTaskResolversLength(): number { + return taskResolvers.size; +} + export function isAnalyticReady(): boolean { return analyticsService.ready; } diff --git a/server/src/index.ts b/server/src/index.ts index 23bfbf2..96df9ff 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -66,6 +66,7 @@ async function init() { lastAlive: AnalyticsController.analyticsLastAlive(), tasksQueueLength: AnalyticsController.getQueueLength() }, + awaitedTasksNumber: AnalyticsController.getTaskResolversLength(), nodeVersion: process.version, packageVersion: PACKAGE_VERSION, npmUserAgent: process.env.npm_config_user_agent,