# pipeline-queue

> A simple request or action queue.

Latest version **2.0.0** (published 2016-08-15) · GPLv2 license · 0 weekly downloads

## Install

```sh
npm install pipeline-queue
pnpm add pipeline-queue
yarn add pipeline-queue
bun add pipeline-queue
```

## 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 | 2.0.0 |
| Published | 2016-08-15 |
| First published | 2014-05-05 |
| Weekly downloads | 0 |
| License | GPLv2 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Nathan Sculli |
| Maintainers | scull7 |
| Keywords | cache, queue |

## Links

- npm: https://www.npmjs.com/package/pipeline-queue
- Repository: https://github.com/scull7/request-queue
- Homepage: https://github.com/scull7/request-queue#readme
- Issues: https://github.com/scull7/request-queue/issues
- npm.io page: https://npm.io/package/pipeline-queue

## Dependencies (1)

- [synchronous-semaphore](https://npm.io/package/synchronous-semaphore.md) ^0.1.0

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2016-08-15
- 1.0.0 — 2016-08-14
- 0.2.2 — 2014-11-11
- 0.2.1 — 2014-10-22
- 0.2.0 — 2014-10-22
- 0.1.0 — 2014-10-14
- 0.0.3 — 2014-05-05
- 0.0.2 — 2014-05-05
- 0.0.1 — 2014-05-05

## README

[![Build Status](https://travis-ci.org/scull7/pipeline-queue.svg?branch=master)](https://travis-ci.org/scull7/pipeline-queue)
[![Coverage Status](https://coveralls.io/repos/scull7/pipeline-queue/badge.png)](https://coveralls.io/r/scull7/pipeline-queue)
[![Code Climate](https://codeclimate.com/github/scull7/pipeline-queue.png)](https://codeclimate.com/github/scull7/pipeline-queue)

pipeline-queue
==============
A simple queuing mechanism that can pipeline requests for a long running resource request.  By using this queue you can make multiple requests to the resource but the resource will only receive traffic as fast as it will respond.

Installation
------------
Just use npm to install.

```javascript
npm install pipeline-queue
```

Usage
-----

```javascript
var PipelineQueue = require('pipeline-queue'),
queue = PipelineQueue();

key = 'unique-key';
task = function () { //do something that takes a long time. };
callback1 = function (results) { // handle the response. };

queue.run(key, task, callback1);

//make a second request
callback2 = function (results) { // handle the response. };

queue.run(key, task, callback2); //if the task has not completed yet,
                                //then our callback will be queued and the task will not be run.
                                //Our callback will receive the results of the initial task run.
```

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