Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(options: { backoffTime: number; maxWaitingTime: number }) {
const { backoffTime, maxWaitingTime } = options;
this.backoffTime = backoffTime;
this.bucket = new LeakyBucket({
capacity: 100,
interval: 10,
maxWaitingTime,
});
this.assignRequest();
}