# queuey

> simple persistent queues

Latest version **1.5.1** (published 2017-02-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install queuey
pnpm add queuey
yarn add queuey
bun add queuey
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.5.1 |
| Published | 2017-02-05 |
| First published | 2017-02-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | tenaciousmv |
| Keywords | queue, persistent, persistent-queue |

## Links

- npm: https://www.npmjs.com/package/queuey
- Repository: https://github.com/mvayngrib/queuey
- Issues: https://github.com/mvayngrib/queuey/issues
- npm.io page: https://npm.io/package/queuey

## Dependencies (2)

- [lowdb](https://npm.io/package/lowdb.md) ^0.14.0
- [bluebird](https://npm.io/package/bluebird.md) ^3.4.7

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 weekly downloads

## Recent versions

- 1.5.1 (latest) — 2017-02-05
- 1.5.0 — 2017-02-05
- 1.4.0 — 2017-02-05
- 1.3.0 — 2017-02-05
- 1.2.1 — 2017-02-03
- 1.2.0 — 2017-02-03
- 1.1.0 — 2017-02-03
- 1.0.0 — 2017-02-02

## README

# queuey

## Usage

```js
const queues = require('queuey')('./testdb.json')

const callGrandmas = queues.queue({
  name: 'grandmas',
  worker: function (grandma) {
    // do stuff
    // optionally return Promise
    return promiseSometimeLater(function () {
      console.log('calling grandma ' + grandma)
    })
  }
})

const callGrandpas = queues.queue({
  name: 'grandpas',
  worker: function (grandpa) {
    // do stuff
    // optionally return Promise
    return promiseSometimeLater(function () {
      console.log('calling grandpa ' + grandpa)
    })
  }
})

callGrandpas.enqueue('Bill')
callGrandpas.enqueue('Ted')
callGrandpas.enqueue('Rufus')

callGrandmas.enqueue('Beyonce')
callGrandmas.enqueue('Rachel McAdams')
callGrandmas.enqueue('Gluugfrinksnoorg')

function promiseSometimeLater (fn) {
  return new Promise(resolve => {
    setTimeout(function () {
      fn()
      resolve()
    }, Math.random() * 1000 | 0)
  })
}

// calling grandpa Bill
// calling grandma Beyonce
// calling grandpa Ted
// calling grandma Rachel McAdams
// calling grandma Gluugfrinksnoorg
// calling grandpa Rufus
```

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