Registry / productivity / simply-queue-manager

simply-queue-manager

JSON →
library0.0.5-beta4jsnpmunverified

A browser-based queue management library that stores jobs in localStorage and processes them asynchronously. Version 0.0.5-beta4 is a pre-release with basic FIFO/LIFO support, timeout, max job limits, and worker retry logic. Unlike server-side queues (Bull, Bee), this library runs entirely in the browser, using localStorage for persistence. It is not production-ready and has no recent updates.

npm install simply-queue-manager
INSTALL
IMPORT
SIG · SIMPLY-QUEUE-MANAG
S
simply-queue-manager
productivityjavascriptv0.0.5-beta4
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.

Queue
import { Queue } from 'simply-queue-manager'
const Queue = require('simply-queue-manager')
ESM only; no CommonJS export
Queue.FIFO
import { Queue } from 'simply-queue-manager'; const principle = Queue.FIFO
const FIFO = require('simply-queue-manager/dist/FIFO')
FIFO is a static property of Queue class
Queue.LIFO
import { Queue } from 'simply-queue-manager'; const principle = Queue.LIFO
const LIFO = require('simply-queue-manager').LIFO
LIFO is a static property of Queue class

Registers a worker class, creates a queue channel, starts listening, and adds a job.

import { Queue } from 'simply-queue-manager'; class SendEmail { retry = 2; handle(args) { return new Promise((resolve) => { resolve(true); }); } } Queue.register([ { handler: SendEmail } ]); const queue = new Queue(); const channelA = queue.create('send-email'); channelA.start(); channelA.add({ handler: 'SendEmail', args: { email: 'johndoe@example.com', fullname: 'John Doe' } });
Debug
Known issues
gotchaWorker handle() must return a Promise. Non-Promise returns may cause unpredictable behaviour.
fix
Ensure handle() returns new Promise(...) with resolve(true/false) or reject.
affects: >=0.0.1
gotchaQueue.register() expects an array of objects with handler property. Passing a bare class or wrong shape will throw.
fix
Use Queue.register([{ handler: MyWorker }])
affects: >=0.0.1
gotchalocalStorage usage means queue data persists across sessions but may hit storage limits (~5MB).
fix
Monitor localStorage size; consider clearing completed jobs manually.
affects: >=0.0.1
deprecatedThe package has not been updated since 2020 and uses outdated dependencies. Security vulnerabilities possible.
fix
Migrate to a maintained queue library like Bull (server) or localForage (browser).
affects: >=0.0.1
Errors
Common errors & fixes
TypeError: Queue is not a constructor
Using CommonJS require instead of ESM import
fix
Use import { Queue } from 'simply-queue-manager'
[object Object] is not a valid worker handler
Passing a string that doesn't match any registered handler name
fix
Ensure channelA.add({ handler: 'SendEmail' }) matches the registered class name exactly
Uncaught (in promise) undefined
Worker handle() resolves with false or rejects without a message
fix
Always resolve(true) on success, resolve(false) for retry, reject('reason') to skip
Upgrade
Version history
0.0.5-beta4latest on npm
Audit
Dependencies
localStoragerequiredUses browser localStorage for job persistence
Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
simply-queue-manager — npm install simply-queue-manager · libregistry