# @abtnode/queue

> A simple job queue built on top of [nedb](https://www.npmjs.com/package/nedb) and [fastq](https://www.npmjs.com/package/fastq)

Latest version **1.17.12** (published 2026-04-22) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @abtnode/queue
pnpm add @abtnode/queue
yarn add @abtnode/queue
bun add @abtnode/queue
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.17.12 |
| Published | 2026-04-22 |
| First published | 2020-05-04 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 17.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | wangshijun |
| Maintainers | wangshijun, polunzh, mave99a |

## Links

- npm: https://www.npmjs.com/package/@abtnode/queue
- npm.io page: https://npm.io/package/@abtnode/queue

## Dependencies (6)

- [uuid](https://npm.io/package/uuid.md) ^11.1.0
- [debug](https://npm.io/package/debug.md) ^4.4.1
- [fastq](https://npm.io/package/fastq.md) ^1.17.1
- [@abtnode/db](https://npm.io/package/@abtnode/db.md) 1.17.12
- [@abtnode/util](https://npm.io/package/@abtnode/util.md) 1.17.12
- [@blocklet/error](https://npm.io/package/@blocklet/error.md) ^0.3.5

## Recent versions

- 1.17.12 (latest) — 2026-04-22
- 1.17.13-beta-20261020-042751-541e5c03 (beta) — 2026-10-20
- 1.16.29-next-680cf137 (next) — 2024-07-19
- 1.2.0-prerelease.1 (prelease) — 2021-02-08
- 1.17.13-beta-20261019-135643-7047c876 — 2026-10-19
- 1.17.13-beta-20261019-111429-5cdb5af8 — 2026-10-19
- 1.17.13-beta-20261019-082907-fe71de61 — 2026-10-19
- 1.17.13-beta-20261019-070231-87338763 — 2026-10-19
- 1.17.13-beta-20261019-060220-4c251fcf — 2026-10-19
- 1.17.13-beta-20261019-013222-23d4b329 — 2026-10-19
- 1.17.13-beta-20261018-133339-4428feb0 — 2026-10-18
- 1.17.13-beta-20261018-131740-92d9b271 — 2026-10-18
- 1.17.13-beta-20261018-112055-27bdf21c — 2026-10-18
- 1.17.13-beta-20261018-074057-557246bf — 2026-10-18
- 1.17.13-beta-20261018-055715-2b3472bb — 2026-10-18
- … 1166 more at https://npm.io/package/@abtnode/queue/versions

## README

# @abtnode/queue

A simple job queue built on top of [nedb](https://www.npmjs.com/package/nedb) and [fastq](https://www.npmjs.com/package/fastq)

## Usage

```shell
yarn add @abtnode/queue
```

Then:

```javascript
const createQueue = require('@abtnode/queue');

const queue = createQueue({
  file: '/path/to/job.db',
  onJob: (job) => {
    console.log('onJob', job);
    const result = someLongTask(job);

    return result;
  },
});

const task = queue.push({ id: 2 });
task.on('failed', ({ id, job, error }) => {
  console.error('job failed', error);
});
task.on('finished', ({ id, job, result }) => {
  console.log('job finished', result);
});
```

---
_Source: https://npm.io/package/@abtnode/queue · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
