Skip to content

Commit 99155a1

Browse files
committed
refactor: enhance startAllNodesWithoutDeduplication method to accept delay parameter
1 parent 76bc631 commit 99155a1

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/modules/users/users.service.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -986,9 +986,12 @@ export class UsersService {
986986
await this.resetUserTrafficQueueService.resetWeeklyUserTraffic();
987987
await this.resetUserTrafficQueueService.resetNoResetUserTraffic();
988988

989-
await this.startAllNodesQueue.startAllNodesWithoutDeduplication({
990-
emitter: 'bulkAllResetUserTraffic',
991-
});
989+
await this.startAllNodesQueue.startAllNodesWithoutDeduplication(
990+
{
991+
emitter: 'bulkAllResetUserTraffic',
992+
},
993+
20_000,
994+
);
992995

993996
return {
994997
isOk: true,

src/queue/start-all-nodes/start-all-nodes.service.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ export class StartAllNodesQueueService
4040
});
4141
}
4242

43-
public async startAllNodesWithoutDeduplication(payload: { emitter: string }) {
44-
return this.addJob(StartAllNodesJobNames.startAllNodes, payload, {});
43+
public async startAllNodesWithoutDeduplication(payload: { emitter: string }, delay?: number) {
44+
return this.addJob(StartAllNodesJobNames.startAllNodes, payload, {
45+
delay,
46+
});
4547
}
4648
}

0 commit comments

Comments
 (0)