File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,6 @@ export class MarQS {
69
69
private redis : Redis ;
70
70
public keys : MarQSKeyProducer ;
71
71
private queuePriorityStrategy : MarQSQueuePriorityStrategy ;
72
- #requeueingWorkers: Array < AsyncWorker > = [ ] ;
73
72
#rebalanceWorkers: Array < AsyncWorker > = [ ] ;
74
73
75
74
constructor ( private readonly options : MarQSOptions ) {
@@ -846,10 +845,14 @@ export class MarQS {
846
845
} ) ;
847
846
848
847
stream . on ( "data" , async ( keys ) => {
849
- stream . pause ( ) ;
850
-
851
848
const uniqueKeys = Array . from ( new Set < string > ( keys ) ) ;
852
849
850
+ if ( uniqueKeys . length === 0 ) {
851
+ return ;
852
+ }
853
+
854
+ stream . pause ( ) ;
855
+
853
856
logger . debug ( "Rebalancing parent queues" , {
854
857
component : "marqs" ,
855
858
operation : "rebalanceParentQueues" ,
You can’t perform that action at this time.
0 commit comments