@@ -83,7 +83,7 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
8383 values . push ( JSON . stringify ( data ) ) ;
8484
8585 const rows = await this . driver . query ( `QUEUE ADD PRIORITY ?${ options . orphanedTimeout ? ' ORPHANED ?' : '' } ? ?` , values ) ;
86- if ( rows && rows . length ) {
86+ if ( rows ? .length ) {
8787 return [
8888 rows [ 0 ] . added === 'true' ? 1 : 0 ,
8989 rows [ 0 ] . id ? parseInt ( rows [ 0 ] . id , 10 ) : null ,
@@ -104,7 +104,7 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
104104 // queryKeyHash as compatibility fallback
105105 queueId || this . prefixKey ( hash ) ,
106106 ] ) ;
107- if ( rows && rows . length ) {
107+ if ( rows ? .length ) {
108108 return this . decodeQueryDefFromRow ( rows [ 0 ] , 'cancelQuery' ) ;
109109 }
110110
@@ -149,7 +149,7 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
149149 const rows = await this . driver . query ( 'CACHE INCR ?' , [
150150 `${ this . options . redisQueuePrefix } :PROCESSING_COUNTER`
151151 ] ) ;
152- if ( rows && rows . length ) {
152+ if ( rows ? .length ) {
153153 return rows [ 0 ] . value ;
154154 }
155155
@@ -186,7 +186,7 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
186186 const rows = await this . driver . query ( 'QUEUE RESULT ?' , [
187187 this . prefixKey ( this . redisHash ( queryKey ) ) ,
188188 ] ) ;
189- if ( rows && rows . length ) {
189+ if ( rows ? .length ) {
190190 return this . decodeQueryDefFromRow ( rows [ 0 ] , 'getResult' ) ;
191191 }
192192
@@ -245,7 +245,7 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
245245 const rows = await this . driver . query ( 'QUEUE GET ?' , [
246246 queueId || this . prefixKey ( hash ) ,
247247 ] ) ;
248- if ( rows && rows . length ) {
248+ if ( rows ? .length ) {
249249 return this . decodeQueryDefFromRow ( rows [ 0 ] , 'getQueryDef' ) ;
250250 }
251251
@@ -271,7 +271,7 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
271271 this . options . concurrency ,
272272 this . prefixKey ( hash ) ,
273273 ] ) ;
274- if ( rows && rows . length ) {
274+ if ( rows ? .length ) {
275275 const active = rows [ 0 ] . active ? ( rows [ 0 ] . active ) . split ( ',' ) as unknown as QueryKeyHash [ ] : [ ] ;
276276 const pending = parseInt ( rows [ 0 ] . pending , 10 ) ;
277277
@@ -302,7 +302,7 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
302302 // queryKeyHash as compatibility fallback
303303 queueId || this . prefixKey ( hash ) ,
304304 ] ) ;
305- if ( rows && rows . length ) {
305+ if ( rows ? .length ) {
306306 return this . decodeQueryDefFromRow ( rows [ 0 ] , 'getResultBlocking' ) ;
307307 }
308308
@@ -348,8 +348,8 @@ export class CubeStoreQueueDriver implements QueueDriverInterface {
348348 return this . connection ;
349349 }
350350
351- // eslint-disable-next-line no-return-assign
352- return this . connection = await this . driverFactory ( ) ;
351+ this . connection = await this . driverFactory ( ) ;
352+ return this . connection ;
353353 }
354354
355355 public async createConnection ( ) : Promise < CubestoreQueueDriverConnection > {
0 commit comments