npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pro_queue

v1.0.0

Published

很多项目可能都会涉及到任务队列来进行任务处理和维护的,那么需要使用到redis或者第三方库(使用redis)来实现任务队列,甚至需要控制并发量,但是对于saas部署来说使用redis可能会比较麻烦和成本提升,那么我们是否可以直接基于程序来使用内存进行任务队列管理,有兴趣可以了解一下这个包:[pro_queue github地址](https://github.com/xiaoyaos/pro_queue "pro_queue")

Readme

很多项目可能都会涉及到任务队列来进行任务处理和维护的,那么需要使用到redis或者第三方库(使用redis)来实现任务队列,甚至需要控制并发量,但是对于saas部署来说使用redis可能会比较麻烦和成本提升,那么我们是否可以直接基于程序来使用内存进行任务队列管理,有兴趣可以了解一下这个包:pro_queue github地址

介绍

该包是借鉴bee-queue github地址库的外部接口规范来对外统一提供任务的创建和执行(设置任务执行相关的数据【间隔、并发、任务处理等】),该包已经支持同时多任务队列管理且处理任务。

使用

// 创建新的队列
const Queue = require('../index');
const testQueue = Queue.newQueue('test');

testQueue.createdJob({a: 'test'});

// test队列设置任务处理及间隔
testQueue.process(1000, (job, done)=>{
  console.log(`\r\nstart queue test process job:`, job.id, job.data);
  return done();
}, true);
testQueue.createdJob({a: 'test'});

关于异步和同步执行队列使用详情请参考根目录下test目录下源码

API

createdJob(any)

name | type | Description
-|-|- obj | object | 需要添加的任务数据可以使任意类型数据 |

process(timeout, callback, sync)

name | type | Description
-|-|- timeout | number | 间隔时间,如果是同步执行,目前忽略间隔参数 | callback | Function | 具体任务数据处理逻辑 | sync | boolean | 是否同步执行,默认异步,按照时间间隔执行 |

待实现功能计划

任务失败重试,可设置重试次数

并发数量

任务执行结果时间

succeeded:任务成功执行

retrying:任务失败需要重新尝试,且剩余尝试次数

failed:任务失败,且没有重试次数

progress:

队列数据持久化

防止程序中断或异常终止时重启程序,队列数据丢失