Skip to content

@concurrent decorator concurrency mode is added

Compare
Choose a tag to compare
@grimmer0125 grimmer0125 released this 14 May 20:01
· 48 commits to master since this release

1.6.0 (2021-05-07)

⭐ Decorator concurrency mode ⭐ is added.

@QConcurrency([
  { limit: 100, isStatic: true },
  { limit: 50, tag: '2' },
])
class TestController {
  @concurrent
  static async fetchData(url: string) {}

⚠ BREAKING CHANGES

// orig: only setup one queue, omitting tag will apply default queue and new tag queue
d4c = new D4C({ concurrency: { limit: 100 } });
d4c.setConcurrency({ limit: 10 });

// new. to setup multiple queue, omitting tag will only for deafult queue and not apply on new tag queue
d4c = new D4C([{ concurrency: { limit: 100 } }]);
d4c.setConcurrency([{ limit: 10 }]);