Skip to content

Commit 7fdedf3

Browse files
committed
Fix excessive logs from the MarQS rebalancer
1 parent f6e23e9 commit 7fdedf3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

apps/webapp/app/v3/marqs/index.server.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ export class MarQS {
6969
private redis: Redis;
7070
public keys: MarQSKeyProducer;
7171
private queuePriorityStrategy: MarQSQueuePriorityStrategy;
72-
#requeueingWorkers: Array<AsyncWorker> = [];
7372
#rebalanceWorkers: Array<AsyncWorker> = [];
7473

7574
constructor(private readonly options: MarQSOptions) {
@@ -846,10 +845,14 @@ export class MarQS {
846845
});
847846

848847
stream.on("data", async (keys) => {
849-
stream.pause();
850-
851848
const uniqueKeys = Array.from(new Set<string>(keys));
852849

850+
if (uniqueKeys.length === 0) {
851+
return;
852+
}
853+
854+
stream.pause();
855+
853856
logger.debug("Rebalancing parent queues", {
854857
component: "marqs",
855858
operation: "rebalanceParentQueues",

0 commit comments

Comments
 (0)