{"id":45958,"library":"qjobs","title":"qjobs","description":"A simple and efficient queue job manager for Node.js, version 1.2.0. It provides concurrency limiting, dynamic queue (jobs can be added while running), optional delay, pause/unpause support, and event emitter-based lifecycle events (start, end, jobStart, jobEnd, pause, unPause). Unlike more complex job queues (e.g., Bull, Kue), qjobs is lightweight, in-memory, and focuses on basic concurrency control without persistence or external dependencies.","status":"active","version":"1.2.0","language":"javascript","source_language":"en","source_url":"git://github.com/franck34/qjobs","tags":["javascript","queue","jobs","job","concurrency","control"],"install":[{"cmd":"npm install qjobs","lang":"bash","label":"npm"},{"cmd":"yarn add qjobs","lang":"bash","label":"yarn"},{"cmd":"pnpm add qjobs","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"CommonJS-only package. No ES module or default export.","wrong":"const qjobs = require('qjobs').default;","symbol":"default","correct":"const qjobs = require('qjobs');"},{"note":"Package does not support ES modules; only CommonJS require works.","wrong":"import qjobs from 'qjobs';","symbol":"qjobs class","correct":"const qjobs = require('qjobs');\nconst q = new qjobs({maxConcurrency:10});"},{"note":"qjobs does not have a createQueue method. Instantiate with new.","wrong":"const q = require('qjobs').createQueue();","symbol":"createQueue (nonexistent)","correct":"const q = new (require('qjobs'))({maxConcurrency:5});"}],"quickstart":{"code":"const qjobs = require('qjobs');\n\nconst myjob = function(args, next) {\n    setTimeout(function() {\n        console.log('Job done:', args);\n        next();\n    }, 1000);\n};\n\nconst q = new qjobs({ maxConcurrency: 10 });\n\nfor (let i = 0; i < 5; i++) {\n    q.add(myjob, [i, 'test ' + i]);\n}\n\nq.on('end', function() {\n    console.log('All jobs completed');\n});\n\nq.run();","lang":"javascript","description":"Shows basic usage: creating a queue with concurrency limit, adding jobs, and running them."},"warnings":[{"fix":"Use require('qjobs') instead of import.","message":"qjobs is CommonJS-only; does not support ES modules. Using import will fail.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Install @types/qjobs or declare your own module types.","message":"The package has no TypeScript type definitions.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Consider migrating to a maintained alternative for production use.","message":"qjobs has been largely superseded by more modern queue libraries like Bull, Bee-Queue, or p-queue.","severity":"deprecated","affected_versions":">=1.0"},{"fix":"Wrap job body in try-catch and call next(err) or use a promise-based wrapper.","message":"Concurrency limiter does not account for asynchronous errors in job functions; uncaught exceptions will crash the process.","severity":"gotcha","affected_versions":">=1.0"}],"env_vars":null,"search_vec":"'1.2.0':12 'ad':22 'base':33 'basic':59 'bull':48 'complex':44 'concurr':15,60,71 'control':61,72 'delay':26 'depend':66 'dynam':17 'e.g':47 'effici':5 'emitt':32 'emitter-bas':31 'end':37 'event':30,35 'extern':65 'focus':57 'in-memori':53 'javascript':67 'job':7,19,45,69,70 'jobend':39 'jobstart':38 'kue':49 'lifecycl':34 'lightweight':52 'limit':16 'manag':8 'memori':55 'node.js':10 'option':25 'paus':40 'pause/unpause':27 'persist':63 'provid':14 'qjob':1,50 'queue':6,18,46,68 'run':24 'simpl':3 'start':36 'support':28 'unlik':42 'unpaus':41 'version':11 'without':62","created_at":"2026-06-07T12:57:34.740527+00:00","updated_at":"2026-06-07T12:57:34.740527+00:00","problems":[{"fix":"Use const qjobs = require('qjobs'); then new qjobs({...});","cause":"Using import statement or incorrect require pattern.","error":"TypeError: qjobs is not a constructor"},{"fix":"Run npm install qjobs in your project directory.","cause":"Package not installed or npm registry issues.","error":"Cannot find module 'qjobs'"},{"fix":"Define your job function with two parameters: (args, next) and call next() when done.","cause":"Job function expects a 'next' callback but not provided or called incorrectly.","error":"ReferenceError: next is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/franck34/qjobs#readme","github":"git://github.com/franck34/qjobs","docs":null,"changelog":null,"pypi":null,"npm":"qjobs","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}