Releases: grimmer0125/d4c-queue
Releases · grimmer0125/d4c-queue
Add option dropWhenReachLimit for better throtting effect.
Update README. Fix potential security vulnerabilities in dependencies and gh-pages publishing.
Update README and fix potential security vulnerabilities in dependencies
Update README and fix potential security vulnerabilities in dependencies
@concurrent decorator concurrency mode is added
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 }]);
⚠ BREAKING CHANGES
⚠ BREAKING CHANGES
/** orig */
d4c.setQueue({ concurrency: 10 });
/** new, rename parameter */
d4c.setQueue({ limit: 10 });
API change
⚠ BREAKING CHANGES
const d4c = new D4C(100);
To
const d4c = new D4C({ concurrency: 100 });
concurrency mode support
⭐ New API ⭐ & minor bug fixes
Add concurrency mode support for D4C instance usage. Previously it only supports synchronization mode (concurrency = 1).
const d4c = new D4C(100);
d4c.setQueue({ concurrency: 10 }); // change default concurrency from 1 to 10
d4c.setQueue({ concurrency: 10, tag: 'queue2' }); // concurrency for queue2
Remove reflect-metadata need
v1.4.2