refactor: tighten ws batch typing and queue cleanup logging

This commit is contained in:
copilot-swe-agent[bot]
2026-06-16 22:50:03 +00:00
committed by GitHub
parent 45158ff45b
commit b66140bfd2
3 changed files with 38 additions and 22 deletions

View File

@@ -76,16 +76,26 @@ export interface SendMessageOptions {
compress?: boolean;
}
// Redis message type for cross-node communication
export interface RedisMessage {
type: "direct" | "direct-batch" | "broadcast";
targetClientId?: string;
excludeClientId?: string;
message: WSMessage;
messages?: {
targetClientId: string;
message: WSMessage;
}[];
fromNodeId: string;
options?: SendMessageOptions;
}
// Redis message types for cross-node communication
export type RedisMessage =
| {
type: "direct";
targetClientId: string;
message: WSMessage;
fromNodeId: string;
}
| {
type: "direct-batch";
messages: {
targetClientId: string;
message: WSMessage;
}[];
fromNodeId: string;
}
| {
type: "broadcast";
excludeClientId?: string;
message: WSMessage;
fromNodeId: string;
options?: SendMessageOptions;
};