IO-3096-GlobalNotifications - Verify status reporter is a function and exists prior to calling it in cleanup task
This commit is contained in:
@@ -22,7 +22,7 @@ const cookieParser = require("cookie-parser");
|
||||
const { Server } = require("socket.io");
|
||||
const { createAdapter } = require("@socket.io/redis-adapter");
|
||||
const { instrument } = require("@socket.io/admin-ui");
|
||||
const { isString, isEmpty } = require("lodash");
|
||||
const { isString, isEmpty, isFunction } = require("lodash");
|
||||
|
||||
const logger = require("./server/utils/logger");
|
||||
const { applyRedisHelpers } = require("./server/utils/redisHelpers");
|
||||
@@ -393,7 +393,9 @@ const main = async () => {
|
||||
|
||||
const StatusReporter = StartStatusReporter();
|
||||
registerCleanupTask(async () => {
|
||||
if (isFunction(StatusReporter?.end)) {
|
||||
StatusReporter.end();
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user