{"_id":"@abhihyder/queueable","_rev":"4-b954754ee332744f3cd0df264ade3e0e","name":"@abhihyder/queueable","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"@abhihyder/queueable","version":"0.0.1","keywords":["queueable","queue","js-queue","js","javascript","utility"],"author":{"name":"Tofayel Hyder Abhi","email":"tofayelhyder71@gmail.com"},"license":"MIT","_id":"@abhihyder/queueable@0.0.1","maintainers":[{"name":"tofayelhyder","email":"abhihyder7@gmail.com"}],"homepage":"https://github.com/abhihyder/queueable#readme","bugs":{"url":"https://github.com/abhihyder/queueable/issues"},"dist":{"shasum":"cbf477dd2b7b16bdb09fe1ce6c213bef5d2e5989","tarball":"https://registry.npmjs.org/@abhihyder/queueable/-/queueable-0.0.1.tgz","fileCount":4,"integrity":"sha512-az8MCep9vqJDHE9xCqKhAVCpi1Ajkc8xcoBc8KcsKzX8XVJ1uyLldP9KFYDgHFW+e5ctbRErUD/OKPbxuqJKiA==","signatures":[{"sig":"MEYCIQCXR1CsqS+5N5Lycjjfwv14PYJeFzRCbb3y6puvjlCGLgIhAKIo5FO+mudlqzcmU0Wt1DWEr5nQ9qXsy3zm/7pv4x+P","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5887},"main":"index.js","gitHead":"07e607ea71aed45e6debc5f2d0a3f598e26dee6a","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"tofayelhyder","email":"abhihyder7@gmail.com"},"repository":{"url":"git+https://github.com/abhihyder/queueable.git","type":"git"},"_npmVersion":"10.5.0","description":"A versatile JavaScript utility for simplifying queue management in applications, serving as an abstraction layer over Bull, a Redis-backed queue package for Node.js. Ideal for building scalable and efficient JavaScript applications.","directories":{},"_nodeVersion":"20.12.2","dependencies":{"bull":"^4.12.3","moment":"^2.30.1","ioredis":"^5.4.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/queueable_0.0.1_1717947487966_0.24967763338849935","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@abhihyder/queueable","version":"0.0.2","keywords":["queueable","queue","js-queue","js","javascript","utility"],"author":{"name":"Tofayel Hyder Abhi","email":"tofayelhyder71@gmail.com"},"license":"MIT","_id":"@abhihyder/queueable@0.0.2","maintainers":[{"name":"tofayelhyder","email":"abhihyder7@gmail.com"}],"homepage":"https://github.com/abhihyder/queueable#readme","bugs":{"url":"https://github.com/abhihyder/queueable/issues"},"dist":{"shasum":"9a702cc6e3bff9d53fd891fed9a041f0323dbac4","tarball":"https://registry.npmjs.org/@abhihyder/queueable/-/queueable-0.0.2.tgz","fileCount":4,"integrity":"sha512-UmHj4KdooJSpqVBDZgNYSp4zizncrWOyXXlyTAv7aNl/q2At82+yB+VYJ4mSJRGz2rROvGacfAtsljr6FzqIzg==","signatures":[{"sig":"MEQCIGYNKywh6tgsH6EwP65TZNTy2T0u4zjuqfEmcYd2VWZ5AiB4K1KtFr09xkgBMWoL5QARpGREDWIVQlGWXkSJ0Pp/UQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7850},"main":"index.js","gitHead":"8bbb2fe39373e467be456178cab9dc291d01345d","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"tofayelhyder","email":"abhihyder7@gmail.com"},"repository":{"url":"git+https://github.com/abhihyder/queueable.git","type":"git"},"_npmVersion":"10.5.0","description":"A versatile JavaScript utility for simplifying queue management in applications, serving as an abstraction layer over Bull, a Redis-backed queue package for Node.js. Ideal for building scalable and efficient JavaScript applications.","directories":{},"_nodeVersion":"20.12.2","dependencies":{"bull":"^4.12.3","moment":"^2.30.1","ioredis":"^5.4.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/queueable_0.0.2_1718083651837_0.8750157888907235","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@abhihyder/queueable","version":"0.0.3","keywords":["queueable","queue","js-queue","js","javascript","utility"],"author":{"name":"Tofayel Hyder Abhi","email":"tofayelhyder71@gmail.com"},"license":"MIT","_id":"@abhihyder/queueable@0.0.3","maintainers":[{"name":"tofayelhyder","email":"abhihyder7@gmail.com"}],"homepage":"https://github.com/abhihyder/queueable#readme","bugs":{"url":"https://github.com/abhihyder/queueable/issues"},"dist":{"shasum":"e76b53a68b52244ef719eeaa3441c860f282957f","tarball":"https://registry.npmjs.org/@abhihyder/queueable/-/queueable-0.0.3.tgz","fileCount":4,"integrity":"sha512-AYiaYGiAhD42KB+fI6fpY9ezUykruid2m4TKH6qfeBMbRIq1mECuuvyRaTFYLdqI7qI/CnuFVYsuMw/6E7PuHg==","signatures":[{"sig":"MEUCIA+UzcdGNV+z1fvsuS6N54J/Bk9AiEVr79QaqqiNAcylAiEAmpXglvO9/Pi1PjbYd9kEdp910++asMpOs8CLZicVoCo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8030},"main":"index.js","gitHead":"de64561bc01151856c875bcceab46b16497d1a4c","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"tofayelhyder","email":"abhihyder7@gmail.com"},"repository":{"url":"git+https://github.com/abhihyder/queueable.git","type":"git"},"_npmVersion":"10.9.2","description":"A versatile JavaScript utility for simplifying queue management in applications, serving as an abstraction layer over Bull, a Redis-backed queue package for Node.js. Ideal for building scalable and efficient JavaScript applications.","directories":{},"_nodeVersion":"22.17.1","dependencies":{"bull":"^4.12.3","moment":"^2.30.1","ioredis":"^5.4.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/queueable_0.0.3_1763484627887_0.2004249013926267","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@abhihyder/queueable","version":"0.0.4","description":"A versatile JavaScript utility for simplifying queue management in applications, serving as an abstraction layer over Bull, a Redis-backed queue package for Node.js. Ideal for building scalable and efficient JavaScript applications.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"bull":"^4.12.3","ioredis":"^5.4.1","moment":"^2.30.1"},"keywords":["queueable","queue","js-queue","js","javascript","utility"],"author":{"name":"Tofayel Hyder Abhi","email":"tofayelhyder71@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/abhihyder/queueable.git"},"license":"MIT","_id":"@abhihyder/queueable@0.0.4","gitHead":"6f47774697306501521bf326fa4ecd4b6f421aae","bugs":{"url":"https://github.com/abhihyder/queueable/issues"},"homepage":"https://github.com/abhihyder/queueable#readme","_nodeVersion":"22.17.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-4GuJsyvFGclt4/57LeFGhPM+k8Ex4U1MgT/um1f/cNxTInHeI68PeNw6WFcYpLmkFVAnT2nxryg7AlqMnegW9w==","shasum":"a2f1549214bfe6dfa733a16ad8ca294d3ea5a884","tarball":"https://registry.npmjs.org/@abhihyder/queueable/-/queueable-0.0.4.tgz","fileCount":4,"unpackedSize":8083,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCxH3KK0yE/0KpaRH4gLh4kV/ExRcnyDlMZRPqXscSEOQIgcJ5MW65980GVELXcPgqXwZz+Dh+5vQYLpbM8bRjer10="}]},"_npmUser":{"name":"tofayelhyder","email":"abhihyder7@gmail.com"},"directories":{},"maintainers":[{"name":"tofayelhyder","email":"abhihyder7@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/queueable_0.0.4_1763564181555_0.8368090228542975"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-09T15:38:07.878Z","modified":"2025-11-19T14:56:21.967Z","0.0.1":"2024-06-09T15:38:08.152Z","0.0.2":"2024-06-11T05:27:31.978Z","0.0.3":"2025-11-18T16:50:28.064Z","0.0.4":"2025-11-19T14:56:21.738Z"},"bugs":{"url":"https://github.com/abhihyder/queueable/issues"},"author":{"name":"Tofayel Hyder Abhi","email":"tofayelhyder71@gmail.com"},"license":"MIT","homepage":"https://github.com/abhihyder/queueable#readme","keywords":["queueable","queue","js-queue","js","javascript","utility"],"repository":{"type":"git","url":"git+https://github.com/abhihyder/queueable.git"},"description":"A versatile JavaScript utility for simplifying queue management in applications, serving as an abstraction layer over Bull, a Redis-backed queue package for Node.js. Ideal for building scalable and efficient JavaScript applications.","maintainers":[{"name":"tofayelhyder","email":"abhihyder7@gmail.com"}],"readme":"# Queueable\n\nA versatile JavaScript utility for simplifying queue management in applications, serving as an abstraction layer over Bull, a Redis-backed queue package for Node.js. Ideal for building scalable and efficient JavaScript applications.\n\n## Why Use Queueable?\n- **Minimal Boilerplate Code**: Avoid writing extensive code for queue instantiation, Redis connection, and cleanup. **Queueable** handles these tasks seamlessly for you.\n- **Easy to Use**: Just extend the `Queueable` class and implement your `handler` method.\n- **Customizable**: Supports custom Redis configurations through a simple `queueable.config.js` file.\n\nWith **Queueable**, you don't need to write a lot of code to:\n- Get a queue instance\n- Close the Redis connection after completion\n- Close the queue after completion\n\nEverything is handled efficiently within the library.\n\n## Installation\n\nInstall via npm:\n\n```bash\nnpm install @abhihyder/queueable\n```\n\n## Usage\n\nBefore using `@abhihyder/queueable`, make sure you have a `Redis` server installed and running.\n\n```javascript\nconst Queueable = require(\"@abhihyder/queueable\");\n\nclass ExampleJob extends Queueable {\n  handler(data) {\n    console.log(\"Processing job with data:\", data);\n  }\n\n  completed(job, result) {\n    console.log(`Job ${job.id} completed with result: ${result}`);\n  }\n\n  failed(job, result) {\n    console.log(`Job ${job.id} failed with result: ${result}`);\n  }\n}\n\nconst job = new ExampleJob();\njob.dispatch({data:\"\"});\n```\n\n## Methods\n\n### `handler(data)`\nYou must implement this method in your derived class to define the job's main logic. The data passed to the dispatch method will be available in the handler method to perform the necessary logic.\n\n### `completed(job, result)` (Optional)\nThis method is called when a job is completed successfully. You can override it in your derived class to perform actions on job completion.\n\n### `failed(job, result)` (Optional)\nThis method is called when a job fails. You can override it in your derived class to perform actions on job failure.\n\n> **Note:** The methods `dispatch`, `queueHandler`, and `queueInstance` are reserved for internal use by the `Queueable` class and should not be overridden in derived classes.\n\n## Configuration\n\nCreate a `queueable.config.js` file in your application's root directory to customize the Redis configuration for Bull. If not provided, default configuration values will be used.\n\nExample `queueable.config.js`:\n\n```javascript\nmodule.exports = {\n  redis: {\n    host: \"127.0.0.1\",\n    port: 6379,\n    username: \"\",\n    password: \"\"\n  }\n};\n```\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).","readmeFilename":"README.md"}