Skip to content

Commit f97fbdc

Browse files
committed
feat(cubestore-driver): Queue - track orphaned set result
1 parent fbc82d0 commit f97fbdc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/cubejs-cubestore-driver/src/CubeStoreQueueDriver.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,15 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
298298
}
299299

300300
public async setResultAndRemoveQuery(hash: QueryKeyHash, executionResult: unknown, _processingId: ProcessingId): Promise<boolean> {
301-
await this.driver.query('QUEUE ACK ? ? ', [
301+
const rows = await this.driver.query('QUEUE ACK ? ? ', [
302302
this.prefixKey(hash),
303303
executionResult ? JSON.stringify(executionResult) : executionResult
304304
]);
305+
if (rows && rows.length === 1) {
306+
return rows[0].success === 'true';
307+
}
305308

309+
// Backward compatibility for old Cube Store
306310
return true;
307311
}
308312

0 commit comments

Comments
 (0)