@@ -83,7 +83,7 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
83
83
values . push ( JSON . stringify ( data ) ) ;
84
84
85
85
const rows = await this . driver . query ( `QUEUE ADD PRIORITY ?${ options . orphanedTimeout ? ' ORPHANED ?' : '' } ? ?` , values ) ;
86
- if ( rows && rows . length ) {
86
+ if ( rows ? .length ) {
87
87
return [
88
88
rows [ 0 ] . added === 'true' ? 1 : 0 ,
89
89
rows [ 0 ] . id ? parseInt ( rows [ 0 ] . id , 10 ) : null ,
@@ -104,7 +104,7 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
104
104
// queryKeyHash as compatibility fallback
105
105
queueId || this . prefixKey ( hash ) ,
106
106
] ) ;
107
- if ( rows && rows . length ) {
107
+ if ( rows ? .length ) {
108
108
return this . decodeQueryDefFromRow ( rows [ 0 ] , 'cancelQuery' ) ;
109
109
}
110
110
@@ -149,7 +149,7 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
149
149
const rows = await this . driver . query ( 'CACHE INCR ?' , [
150
150
`${ this . options . redisQueuePrefix } :PROCESSING_COUNTER`
151
151
] ) ;
152
- if ( rows && rows . length ) {
152
+ if ( rows ? .length ) {
153
153
return rows [ 0 ] . value ;
154
154
}
155
155
@@ -186,7 +186,7 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
186
186
const rows = await this . driver . query ( 'QUEUE RESULT ?' , [
187
187
this . prefixKey ( this . redisHash ( queryKey ) ) ,
188
188
] ) ;
189
- if ( rows && rows . length ) {
189
+ if ( rows ? .length ) {
190
190
return this . decodeQueryDefFromRow ( rows [ 0 ] , 'getResult' ) ;
191
191
}
192
192
@@ -245,7 +245,7 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
245
245
const rows = await this . driver . query ( 'QUEUE GET ?' , [
246
246
queueId || this . prefixKey ( hash ) ,
247
247
] ) ;
248
- if ( rows && rows . length ) {
248
+ if ( rows ? .length ) {
249
249
return this . decodeQueryDefFromRow ( rows [ 0 ] , 'getQueryDef' ) ;
250
250
}
251
251
@@ -271,7 +271,7 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
271
271
this . options . concurrency ,
272
272
this . prefixKey ( hash ) ,
273
273
] ) ;
274
- if ( rows && rows . length ) {
274
+ if ( rows ? .length ) {
275
275
const active = rows [ 0 ] . active ? ( rows [ 0 ] . active ) . split ( ',' ) as unknown as QueryKeyHash [ ] : [ ] ;
276
276
const pending = parseInt ( rows [ 0 ] . pending , 10 ) ;
277
277
@@ -302,7 +302,7 @@ class CubestoreQueueDriverConnection implements QueueDriverConnectionInterface {
302
302
// queryKeyHash as compatibility fallback
303
303
queueId || this . prefixKey ( hash ) ,
304
304
] ) ;
305
- if ( rows && rows . length ) {
305
+ if ( rows ? .length ) {
306
306
return this . decodeQueryDefFromRow ( rows [ 0 ] , 'getResultBlocking' ) ;
307
307
}
308
308
@@ -348,8 +348,8 @@ export class CubeStoreQueueDriver implements QueueDriverInterface {
348
348
return this . connection ;
349
349
}
350
350
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 ;
353
353
}
354
354
355
355
public async createConnection ( ) : Promise < CubestoreQueueDriverConnection > {
0 commit comments