@@ -232,9 +232,9 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
232232 return payload ;
233233 }
234234
235- public async getQueryDef ( queryKey : QueryKeyHash ) : Promise < QueryDef | null > {
235+ public async getQueryDef ( hash : QueryKeyHash , queueId : QueueId | null ) : Promise < QueryDef | null > {
236236 const rows = await this . driver . query ( 'QUEUE GET ?' , [
237- this . prefixKey ( queryKey )
237+ queueId || this . prefixKey ( hash ) ,
238238 ] ) ;
239239 if ( rows && rows . length ) {
240240 return this . decodeQueryDefFromRow ( rows [ 0 ] , 'getQueryDef' ) ;
@@ -243,10 +243,10 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
243243 return null ;
244244 }
245245
246- public async optimisticQueryUpdate ( queryKeyHash : QueryKeyHash , toUpdate : unknown , _processingId : ProcessingId , queueId : QueueId ) : Promise < boolean > {
246+ public async optimisticQueryUpdate ( hash : QueryKeyHash , toUpdate : unknown , _processingId : ProcessingId , queueId : QueueId ) : Promise < boolean > {
247247 await this . driver . query ( 'QUEUE MERGE_EXTRA ? ?' , [
248248 // queryKeyHash as compatibility fallback
249- queueId || this . prefixKey ( queryKeyHash ) ,
249+ queueId || this . prefixKey ( hash ) ,
250250 JSON . stringify ( toUpdate )
251251 ] ) ;
252252
@@ -257,10 +257,10 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
257257 // nothing to release
258258 }
259259
260- public async retrieveForProcessing ( queryKeyHashed : QueryKeyHash , _processingId : string ) : Promise < RetrieveForProcessingResponse > {
260+ public async retrieveForProcessing ( hash : QueryKeyHash , _processingId : string ) : Promise < RetrieveForProcessingResponse > {
261261 const rows = await this . driver . query < { id : string /* cube store convert int64 to string */ , active : string | null , pending : string , payload : string , extra : string | null } > ( 'QUEUE RETRIEVE EXTENDED CONCURRENCY ? ?' , [
262262 this . options . concurrency ,
263- this . prefixKey ( queryKeyHashed ) ,
263+ this . prefixKey ( hash ) ,
264264 ] ) ;
265265 if ( rows && rows . length ) {
266266 const active = rows [ 0 ] . active ? ( rows [ 0 ] . active ) . split ( ',' ) as unknown as QueryKeyHash [ ] : [ ] ;
@@ -287,11 +287,11 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
287287 return null ;
288288 }
289289
290- public async getResultBlocking ( queryKeyHash : QueryKeyHash , queueId : QueueId ) : Promise < QueryDef | null > {
290+ public async getResultBlocking ( hash : QueryKeyHash , queueId : QueueId ) : Promise < QueryDef | null > {
291291 const rows = await this . driver . query ( 'QUEUE RESULT_BLOCKING ? ?' , [
292292 this . options . continueWaitTimeout * 1000 ,
293293 // queryKeyHash as compatibility fallback
294- queueId || this . prefixKey ( queryKeyHash ) ,
294+ queueId || this . prefixKey ( hash ) ,
295295 ] ) ;
296296 if ( rows && rows . length ) {
297297 return this . decodeQueryDefFromRow ( rows [ 0 ] , 'getResultBlocking' ) ;
0 commit comments