Skip to content

Commit

Permalink
step
Browse files Browse the repository at this point in the history
  • Loading branch information
Miniast committed May 11, 2024
1 parent 13bb7b6 commit 187f6ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/crawler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ class Crawler extends EventEmitter {

private _schedule = (options: crawlerOptions): void => {
this.emit("schedule", options);
this._limiters.getRateLimiter(options.rateLimiterId).submit(options.priority as number, (done, limiter) => {
this._limiters.getRateLimiter(options.rateLimiterId).submit(options.priority as number, (done, rateLimiterId) => {
options.release = () => {
done();
this.emit("_release");
};
options.callback = options.callback || options.release;

if (limiter) {
this.emit("limiterChange", options, limiter);
if (rateLimiterId) {
this.emit("limiterChange", options, rateLimiterId);
}

if (options.html) {
Expand Down

0 comments on commit 187f6ae

Please sign in to comment.