print an error when booting with both MK_ONLY_SERVER and MK_ONLY_QUEUE set
This commit is contained in:
parent
d426e2a7ef
commit
e96fe824bb
1 changed files with 7 additions and 2 deletions
|
@ -90,7 +90,7 @@ export async function masterMain() {
|
||||||
maxBreadcrumbs: 0,
|
maxBreadcrumbs: 0,
|
||||||
|
|
||||||
// Set release version
|
// Set release version
|
||||||
release: "Sharkey@" + meta.version,
|
release: 'Sharkey@' + meta.version,
|
||||||
|
|
||||||
...config.sentryForBackend.options,
|
...config.sentryForBackend.options,
|
||||||
});
|
});
|
||||||
|
@ -100,6 +100,11 @@ export async function masterMain() {
|
||||||
`mode: [disableClustering: ${envOption.disableClustering}, onlyServer: ${envOption.onlyServer}, onlyQueue: ${envOption.onlyQueue}]`,
|
`mode: [disableClustering: ${envOption.disableClustering}, onlyServer: ${envOption.onlyServer}, onlyQueue: ${envOption.onlyQueue}]`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (envOption.onlyServer && envOption.onlyQueue) {
|
||||||
|
bootLogger.error('Configuration error: onlyServer and onlyQueue cannot both be set. To run both server and queue workers, disable / remove both options.');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
if (!envOption.disableClustering) {
|
if (!envOption.disableClustering) {
|
||||||
// clusterモジュール有効時
|
// clusterモジュール有効時
|
||||||
|
|
||||||
|
@ -115,7 +120,7 @@ export async function masterMain() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.clusterLimit === 0) {
|
if (config.clusterLimit === 0) {
|
||||||
bootLogger.error("Configuration error: we can't create workers, `config.clusterLimit` is 0 (if you don't want to use clustering, set the environment variable `MK_DISABLE_CLUSTERING` to a non-empty value instead)", null, true);
|
bootLogger.error('Configuration error: we can\'t create workers, `config.clusterLimit` is 0 (if you don\'t want to use clustering, set the environment variable `MK_DISABLE_CLUSTERING` to a non-empty value instead)', null, true);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue