File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import pLimit, { type LimitFunction } from 'p-limit'
22import { CancelReason } from './CancelReason'
33import { TaskRecord , type TaskOptions } from './TaskRecord'
44
5- export interface BucketOptions {
5+ export interface QueueOptions {
66 /** The maximum number of tokens in the bucket controls the burst limit */
77 burstLimit : number
88 /** Rate at which tokens are added to the bucket (tokens per second) controls the sustained rate */
@@ -37,7 +37,7 @@ export class TaskQueue {
3737 private timeout : number | null = null
3838 private lastRefillTime : number = Date . now ( )
3939
40- constructor ( options : BucketOptions ) {
40+ constructor ( options : QueueOptions ) {
4141 this . burstLimit = options . burstLimit
4242 this . sustainRate = options . sustainRate
4343 this . tokenCount = options . startingTokens ?? options . burstLimit
Original file line number Diff line number Diff line change 11export { CancelReason } from './CancelReason'
2- export { type BucketOptions , TaskQueue } from './TaskQueue'
2+ export { type QueueOptions , TaskQueue } from './TaskQueue'
You can’t perform that action at this time.
0 commit comments