-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(core): Simplify Redis client types (no-changelog) (#10397)
- Loading branch information
Showing
6 changed files
with
27 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export type RedisClientType = N8nRedisClientType | BullRedisClientType; | ||
|
||
/** | ||
* Redis client used by n8n. | ||
* | ||
* - `subscriber(n8n)` to listen for messages from scaling mode communication channels | ||
* - `publisher(n8n)` to send messages into scaling mode communication channels | ||
* - `cache(n8n)` for caching operations (variables, resource ownership, etc.) | ||
*/ | ||
type N8nRedisClientType = 'subscriber(n8n)' | 'publisher(n8n)' | 'cache(n8n)'; | ||
|
||
/** | ||
* Redis client used internally by Bull. Suffixed with `(bull)` at `ScalingService.setupQueue`. | ||
* | ||
* - `subscriber(bull)` for event listening | ||
* - `client(bull)` for general queue operations | ||
* - `bclient(bull)` for blocking operations when processing jobs | ||
*/ | ||
type BullRedisClientType = 'subscriber(bull)' | 'client(bull)' | 'bclient(bull)'; |