fix: Queue health monitor should only run on worker processes (#6228)

This commit is contained in:
Tom Moor
2023-11-27 20:55:00 -05:00
committed by GitHub
parent 2db7776533
commit 07cd13f17a
7 changed files with 62 additions and 40 deletions

View File

@@ -18,6 +18,7 @@ import {
IsBoolean,
MaxLength,
} from "class-validator";
import uniq from "lodash/uniq";
import { languages } from "@shared/i18n";
import { CannotUseWithout } from "@server/utils/validators";
import Deprecated from "./models/decorators/Deprecated";
@@ -226,16 +227,20 @@ export class Environment {
public DEFAULT_LANGUAGE = process.env.DEFAULT_LANGUAGE ?? "en_US";
/**
* A comma separated list of which services should be enabled on this
* instance defaults to all.
* A comma list of which services should be enabled on this instance defaults to all.
*
* If a services flag is passed it takes priority over the environment variable
* for example: --services=web,worker
*/
public SERVICES =
getArg("services") ??
process.env.SERVICES ??
"collaboration,websockets,worker,web";
public SERVICES = uniq(
(
getArg("services") ??
process.env.SERVICES ??
"collaboration,websockets,worker,web"
)
.split(",")
.map((service) => service.toLowerCase().trim())
);
/**
* Auto-redirect to https in production. The default is true but you may set