mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 11:49:59 +00:00
refactor(core): Separate listeners in scaling service (no-changelog) (#10487)
This commit is contained in:
@@ -40,8 +40,15 @@ export class InstanceSettings {
|
||||
|
||||
readonly instanceId = this.generateInstanceId();
|
||||
|
||||
/** Always `leader` in single-main setup. `leader` or `follower` in multi-main setup. */
|
||||
private instanceRole: InstanceRole = 'unset';
|
||||
/**
|
||||
* A main is:
|
||||
* - `unset` during bootup,
|
||||
* - `leader` after bootup in single-main setup,
|
||||
* - `leader` or `follower` after bootup in multi-main setup.
|
||||
*
|
||||
* A non-main instance type (e.g. `worker`) is always `unset`.
|
||||
*/
|
||||
instanceRole: InstanceRole = 'unset';
|
||||
|
||||
get isLeader() {
|
||||
return this.instanceRole === 'leader';
|
||||
|
||||
Reference in New Issue
Block a user