Registry / devops / async-queue

async-queue

JSON →
library0.1.0jsnpmunverified

Simple FIFO queue for executing async functions sequentially. Version 0.1.0 is the latest stable release, last updated in 2013. It provides a concise API for queuing asynchronous jobs that run one after another, each with success/failure callbacks. Unlike modern alternatives like p-queue or bottleneck, this package is extremely minimal, lacks promise support, and has no concurrency control. It is primarily intended for Node.js environments with callbacks.

npm install async-queue
INSTALL
IMPORT
SIG · ASYNC-QUEUE
A
async-queue
devopsjavascriptv0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AsyncQueue
const AsyncQueue = require('async-queue');
import AsyncQueue from 'async-queue';
The package is CommonJS-only and does not support ESM imports. Attempting to use ES import syntax will fail.

Creates a queue with two callback-based jobs and runs them sequentially.

const AsyncQueue = require('async-queue'); new AsyncQueue( function(err, job) { if (err) job.fail(err); setTimeout(function() { console.log('First job executed'); job.success(); }, 500); }, function(err, job) { console.log('Second job executed'); job.success(); } ).run();
Debug
Known issues
deprecatedPackage is unmaintained since 2013. No promises, no concurrency control.
fix
Use p-queue or bottleneck for modern async queue needs.
affects: >=0.1.0
breakingConstructor expects job functions with (err, job) callbacks; incorrect signature causes silent failures.
fix
Ensure each job callback receives (err, job) and calls job.success() or job.fail() appropriately.
affects: >=0.0.0
gotchaNo error propagation; errors must be handled per job via job.fail() or the err argument.
fix
Always check the 'err' argument in job callbacks and call job.fail(err) when errors occur.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: AsyncQueue is not a constructor
Using ES module import (e.g., import AsyncQueue from 'async-queue') on a CommonJS-only package.
fix
Use const AsyncQueue = require('async-queue');
TypeError: job.success is not a function
The second argument to a job callback is not the expected job object; often due to incorrect callback signature or interference from other error handling.
fix
Ensure job callbacks follow the (err, job) pattern and never call job.success before job.fail.
TypeError: Cannot read property 'fail' of undefined
Calling job.fail() inside a job callback that did not receive the job object (e.g., using a different parameter order).
fix
Verify that the second parameter in the job function is the job object, e.g., function(err, job){ ... }.
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
async-queue — npm install async-queue · libregistry