refactor(core): Include self-sending and debouncing in pubsub commands (#11149)

This commit is contained in:
Iván Ovejero
2024-10-08 11:18:12 +02:00
committed by GitHub
parent 1ca14946d9
commit 1ded08bf7e
6 changed files with 41 additions and 15 deletions

View File

@@ -7,3 +7,17 @@ export const COMMAND_PUBSUB_CHANNEL = 'n8n.commands';
/** Pubsub channel for messages sent by workers in response to commands from main processes. */
export const WORKER_RESPONSE_PUBSUB_CHANNEL = 'n8n.worker-response';
/**
* Commands that should be sent to the sender as well, e.g. during workflow activation and
* deactivation in multi-main setup. */
export const SELF_SEND_COMMANDS = new Set([
'add-webhooks-triggers-and-pollers',
'remove-triggers-and-pollers',
]);
/**
* Commands that should not be debounced when received, e.g. during webhook handling in
* multi-main setup.
*/
export const IMMEDIATE_COMMANDS = new Set(['relay-execution-lifecycle-event']);