mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor(core): Port concurrency config (#18324)
This commit is contained in:
@@ -11,6 +11,21 @@ class PruningIntervalsConfig {
|
||||
softDelete: number = 60;
|
||||
}
|
||||
|
||||
@Config
|
||||
class ConcurrencyConfig {
|
||||
/**
|
||||
* Max production executions allowed to run concurrently. `-1` means unlimited.
|
||||
*
|
||||
* Default for scaling mode is taken from the worker's `--concurrency` flag.
|
||||
*/
|
||||
@Env('N8N_CONCURRENCY_PRODUCTION_LIMIT')
|
||||
productionLimit: number = -1;
|
||||
|
||||
/** Max evaluation executions allowed to run concurrently. `-1` means unlimited. */
|
||||
@Env('N8N_CONCURRENCY_EVALUATION_LIMIT')
|
||||
evaluationLimit: number = -1;
|
||||
}
|
||||
|
||||
@Config
|
||||
export class ExecutionsConfig {
|
||||
/** Whether to delete past executions on a rolling basis. */
|
||||
@@ -38,4 +53,7 @@ export class ExecutionsConfig {
|
||||
|
||||
@Nested
|
||||
pruneDataIntervals: PruningIntervalsConfig;
|
||||
|
||||
@Nested
|
||||
concurrency: ConcurrencyConfig;
|
||||
}
|
||||
|
||||
@@ -310,6 +310,10 @@ describe('GlobalConfig', () => {
|
||||
hardDelete: 15,
|
||||
softDelete: 60,
|
||||
},
|
||||
concurrency: {
|
||||
productionLimit: -1,
|
||||
evaluationLimit: -1,
|
||||
},
|
||||
},
|
||||
diagnostics: {
|
||||
enabled: true,
|
||||
|
||||
Reference in New Issue
Block a user