mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
* support redis cluster * cleanup, fix config schema * set default prefix to bull * initial commit * improve logging * improve types and refactor * list support and refactor * fix redis service and tests * add comment * add redis and cache prefix * use injection * lint fix * clean schema comments * improve naming, tests, cluster client * merge master * cache returns unknown instead of T * update cache service, tests and doc * remove console.log * do not cache null or undefined values * fix merge * lint fix
23 lines
781 B
TypeScript
23 lines
781 B
TypeScript
export type RedisServiceCommand = 'getStatus' | 'restartEventBus' | 'stopWorker'; // TODO: add more commands
|
|
|
|
/**
|
|
* An object to be sent via Redis pub/sub from the main process to the workers.
|
|
* @field command: The command to be executed.
|
|
* @field targets: The targets to execute the command on. Leave empty to execute on all workers or specify worker ids.
|
|
* @field args: Optional arguments to be passed to the command.
|
|
*/
|
|
type RedisServiceBaseCommand = {
|
|
command: RedisServiceCommand;
|
|
payload?: {
|
|
[key: string]: string | number | boolean | string[] | number[] | boolean[];
|
|
};
|
|
};
|
|
|
|
export type RedisServiceWorkerResponseObject = {
|
|
workerId: string;
|
|
} & RedisServiceBaseCommand;
|
|
|
|
export type RedisServiceCommandObject = {
|
|
targets?: string[];
|
|
} & RedisServiceBaseCommand;
|