refactor(core): Add low concurrency warning to worker (#11762)

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Iván Ovejero 2024-11-19 16:22:07 +01:00 committed by GitHub
parent 274fcf45d3
commit b8c7075545
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -148,6 +148,12 @@ export class Worker extends BaseCommand {
const envConcurrency = config.getEnv('executions.concurrency.productionLimit'); const envConcurrency = config.getEnv('executions.concurrency.productionLimit');
this.concurrency = envConcurrency !== -1 ? envConcurrency : flags.concurrency; this.concurrency = envConcurrency !== -1 ? envConcurrency : flags.concurrency;
if (this.concurrency < 5) {
this.logger.warn(
'Concurrency is set to less than 5. THIS CAN LEAD TO AN UNSTABLE ENVIRONMENT. Please consider increasing it to at least 5 to make best use of the worker.',
);
}
} }
async initScalingService() { async initScalingService() {