Skip to content

Commit

Permalink
wip: fix concurrency queues initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
burivuhster committed Dec 27, 2024
1 parent 7340fa7 commit e467f5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ describe('ConcurrencyControlService', () => {
expect(service.isEnabled).toBe(true);
// @ts-expect-error Private property
expect(service.queues.get(type)).toBeDefined();
// @ts-expect-error Private property
expect(service.queues.size).toBe(1);
},
);

Expand Down
4 changes: 3 additions & 1 deletion packages/cli/src/concurrency/concurrency-control.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export class ConcurrencyControlService {

this.queues = new Map();
this.limits.forEach((limit, type) => {
this.queues.set(type, new ConcurrencyQueue(limit));
if (limit > 0) {
this.queues.set(type, new ConcurrencyQueue(limit));
}
});

this.logInit();
Expand Down

0 comments on commit e467f5e

Please sign in to comment.