Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

排队的任务没有执行 #25

Closed
poype opened this issue Nov 26, 2019 · 3 comments
Closed

排队的任务没有执行 #25

poype opened this issue Nov 26, 2019 · 3 comments

Comments

@poype
Copy link

poype commented Nov 26, 2019

一共有100个任务,Bagpipe的并发数设置为5。后面95个任务在队列排队。但前5个任务执行完成后,后面95个任务都没有执行,一致在阻塞。

@lilifan
Copy link

lilifan commented Jun 29, 2020

应该是你用法不对,基本的使用场景不可能出错的。方便贴下代码吗? @poype

@tongzhenyu0312
Copy link

一共有100个任务,Bagpipe的并发数设置为5。后面95个任务在队列排队。但前5个任务执行完成后,后面95个任务都没有执行,一致在阻塞。

看源码队列长度超过限制是:

  // 队列长度也超过限制值时
    if (this.queue.length < this.queueLength || !this.options.refuse) {
      this.queue.push({
        method: method,
        args: args
      });
    } else {
      var err = new Error('Too much async call in queue');
      err.name = 'TooMuchAsyncCallError';
      callback(err);
    }

是不是设置了options.refuse? @poype

@JacksonTian
Copy link
Owner

应该就是没有正常 callback。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants