{"id":15831566,"url":"https://github.com/gadingnst/concurrent-manager","last_synced_at":"2025-09-10T16:31:26.766Z","repository":{"id":57700889,"uuid":"496499666","full_name":"gadingnst/concurrent-manager","owner":"gadingnst","description":"A simple and fast way to manage concurrent promise tasks with Queue Data Structure.","archived":false,"fork":false,"pushed_at":"2023-03-01T01:04:03.000Z","size":2649,"stargazers_count":5,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-19T15:28:29.323Z","etag":null,"topics":["concurrent-queues","promise","promise-concurrent","promise-library","promise-queue","queue"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/concurrent-manager","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gadingnst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"gadingnst","custom":["https://trakteer.id/gadingnst","https://karyakarsa.com/gadingnst"]}},"created_at":"2022-05-26T05:59:56.000Z","updated_at":"2024-01-12T03:36:29.000Z","dependencies_parsed_at":"2024-10-26T16:54:49.324Z","dependency_job_id":"afe057ae-e4b3-4714-9008-aa8909780490","html_url":"https://github.com/gadingnst/concurrent-manager","commit_stats":{"total_commits":30,"total_committers":3,"mean_commits":10.0,"dds":0.5333333333333333,"last_synced_commit":"b3f903c959f6e1ef05a819af6ac0a34e77a66bce"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/gadingnst/concurrent-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gadingnst%2Fconcurrent-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gadingnst%2Fconcurrent-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gadingnst%2Fconcurrent-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gadingnst%2Fconcurrent-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gadingnst","download_url":"https://codeload.github.com/gadingnst/concurrent-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gadingnst%2Fconcurrent-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274487231,"owners_count":25294480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["concurrent-queues","promise","promise-concurrent","promise-library","promise-queue","queue"],"created_at":"2024-10-05T12:04:35.069Z","updated_at":"2025-09-10T16:31:26.400Z","avatar_url":"https://github.com/gadingnst.png","language":"TypeScript","funding_links":["https://ko-fi.com/gadingnst","https://trakteer.id/gadingnst","https://karyakarsa.com/gadingnst"],"categories":[],"sub_categories":[],"readme":"# Concurrent Manager\n\n[![npm](https://img.shields.io/npm/v/concurrent-manager.svg)](https://www.npmjs.com/package/concurrent-manager)\n[![npm](https://img.shields.io/npm/dt/concurrent-manager.svg)](https://npm-stat.com/charts.html?package=concurrent-manager)\n[![GitHub issues](https://img.shields.io/github/issues/gadingnst/concurrent-manager.svg)](https://github.com/gadingnst/concurrent-manager/issues)\n\nA simple and fast way to manage concurrent promise tasks with Queue Data Structure.\n\n## Table of Contents\n- [Concurrent Manager](#concurrent-manager)\n  - [Table of Contents](#table-of-contents)\n  - [Why should I use it?](#why-should-i-use-it)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [Creating Instance](#creating-instance)\n    - [Queueing Process](#queueing-process)\n  - [Publishing](#publishing)\n  - [License](#license)\n  - [Feedbacks and Issues](#feedbacks-and-issues)\n\n## Why should I use it?\nSometimes you have to do any large concurrent processing using a `Promise` list and you don't want to `Promise.all` then because it will load all the promises into memory and will stop when any error occur. This package can help you with that! You can run concurrent promise by queuing it and set if it can continue processing even if any error occur. It has zero external dependencies.\n\n## Installation\n```bash\nnpm i concurrent-manager\n```\n\n## Usage\n\n### Creating Instance\n```javascript\nimport ConcurrentManager from 'concurrent-manager';\n\nconst concurrent = new ConcurrentManager({\n  concurrent: 10, // max concurrent process to be run\n  withMillis: true // add millisecond tracing to process\n});\n```\n\n### Queueing Process\n```javascript\nconcurrent.queue(() =\u003e {\n  return doSomethingPromiseRequest();\n});\n\n// or\nconcurrent.queue(async() =\u003e {\n  const response = await doSomethingPromiseRequest();\n  return response;\n});\n\n// Run all queued process\nconsole.log(concurrent.getListedProcess());\nconcurrent.run()\n  .then(() =\u003e {\n    // You can access that fulfilled \u0026 rejected are here\n    console.log(concurrent.getListedProcess());\n  });\n```\n\nBut, you can run it independently too!\n```javascript\nconst processId = concurrent.queue(() =\u003e {\n  return doSomethingPromiseRequest();\n});\n\nconcurrent.getProcess(processId)\n  .run()\n  .then((response) =\u003e {\n    console.log('Response ==\u003e', response);\n  });\n```\n\nYou can alse re-trying run promise if that has rejected.\n```javascript\nasync function main() {\n  concurrent.queue(() =\u003e {\n    return doSomethingPromiseRequest();\n  });\n\n  // or\n  concurrent.queue(async() =\u003e {\n    const response = await doSomethingPromiseRequest();\n    return response;\n  });\n\n  // Run all queued promises\n  await concurrent.run()\n\n  const rejected = concurrent.getProcess('rejected');\n\n  concurrent.getListedProcess('rejected')\n    .forEach((process) =\u003e process.run());\n}\n```\n\n## Publishing\n- Before pushing your changes to Github, make sure that `version` in `package.json` is changed to newest version. Then run `npm install` for synchronize it to `package-lock.json`\n- After your changes have been merged on branch `main`, you can publish the packages by creating new Relase here: https://github.com/gadingnst/concurrent-manager/releases/new\n- Create new `tag`, make sure the `tag` name is same as the `version` in `package.json`.\n- You can write Release title and notes here. Or you can use auto-generated release title and notes.\n- Click `Publish Release` button, then wait the package to be published.\n\n## License\n`concurrent-manager` is freely distributable under the terms of the [MIT license](https://github.com/gadingnst/concurrent-manager/blob/master/LICENSE).\n\n## Feedbacks and Issues\nFeel free to open issues if you found any feedback or issues on `concurrent-manager`. And feel free if you want to contribute too! 😄\n\n---\nBuilt with ❤️ by [Sutan Gading Fadhillah Nasution](https://github.com/gadingnst) on 2022\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgadingnst%2Fconcurrent-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgadingnst%2Fconcurrent-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgadingnst%2Fconcurrent-manager/lists"}