Skip to content

Commit bfec376

Browse files
authored
refactor(query-orchestrator): Migrate LocalQueueDriver to TypeScript (#9816)
1 parent f11fc23 commit bfec376

File tree

5 files changed

+385
-390
lines changed

5 files changed

+385
-390
lines changed

packages/cubejs-base-driver/src/queue-driver.interface.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@ export type ProcessingId = string | number;
66
export type QueryKey = (string | [string, any[]]) & {
77
persistent?: true,
88
};
9-
export interface QueryKeyHash extends String {
10-
__type: 'QueryKeyHash'
11-
}
9+
export type QueryKeyHash = string & { __type: 'QueryKeyHash' };
1210

1311
export type QueryKeysTuple = [keyHash: QueryKeyHash, queueId: QueueId | null /** Supported by new Cube Store and Memory */];
1412
export type GetActiveAndToProcessResponse = [active: QueryKeysTuple[], toProcess: QueryKeysTuple[]];
1513
export type AddToQueueResponse = [added: number, queueId: QueueId | null, queueSize: number, addedToQueueTime: number];
1614
export type QueryStageStateResponse = [active: string[], toProcess: string[]] | [active: string[], toProcess: string[], defs: Record<string, QueryDef>];
1715
export type RetrieveForProcessingSuccess = [
1816
added: unknown,
19-
// QueueId is required for Cube Store, other providers doesn't support it
17+
// QueueId is required for Cube Store, other providers don't support it
2018
queueId: QueueId | null,
2119
active: QueryKeyHash[],
2220
pending: number,
@@ -25,7 +23,7 @@ export type RetrieveForProcessingSuccess = [
2523
];
2624
export type RetrieveForProcessingFail = [
2725
added: unknown,
28-
// QueueId is required for Cube Store, other providers doesn't support it
26+
// QueueId is required for Cube Store, other providers don't support it
2927
queueId: QueueId | null,
3028
active: QueryKeyHash[],
3129
pending: number,

0 commit comments

Comments
 (0)