{"id":18821170,"url":"https://github.com/compwright/worker-bee","last_synced_at":"2026-07-09T17:31:40.724Z","repository":{"id":35068177,"uuid":"194132259","full_name":"compwright/worker-bee","owner":"compwright","description":"A process wrapper for Bee-Queue workers","archived":false,"fork":false,"pushed_at":"2023-07-18T20:27:42.000Z","size":855,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-27T11:44:11.772Z","etag":null,"topics":["bee-queue","cluster","worker"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@compwright/worker-bee","language":"JavaScript","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/compwright.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":{"github":"compwright"}},"created_at":"2019-06-27T16:51:34.000Z","updated_at":"2023-03-05T20:47:00.000Z","dependencies_parsed_at":"2024-11-08T00:35:29.156Z","dependency_job_id":"6f4bf0f4-0102-46bf-bfd7-8b0d8ff611a4","html_url":"https://github.com/compwright/worker-bee","commit_stats":{"total_commits":30,"total_committers":2,"mean_commits":15.0,"dds":"0.19999999999999996","last_synced_commit":"31ba3f60fefcd71ab17b44d0a7f8e20c1c4bf7c1"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/compwright/worker-bee","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Fworker-bee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Fworker-bee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Fworker-bee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Fworker-bee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compwright","download_url":"https://codeload.github.com/compwright/worker-bee/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Fworker-bee/sbom","scorecard":{"id":301927,"data":{"date":"2025-08-11","repo":{"name":"github.com/compwright/worker-bee","commit":"31ba3f60fefcd71ab17b44d0a7f8e20c1c4bf7c1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"17 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-35q2-47q7-3pc3","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T20:51:46.272Z","repository_id":35068177,"created_at":"2025-08-17T20:51:46.272Z","updated_at":"2025-08-17T20:51:46.272Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35308362,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-09T02:00:07.329Z","response_time":57,"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":["bee-queue","cluster","worker"],"created_at":"2024-11-08T00:35:16.865Z","updated_at":"2026-07-09T17:31:40.706Z","avatar_url":"https://github.com/compwright.png","language":"JavaScript","funding_links":["https://github.com/sponsors/compwright"],"categories":[],"sub_categories":[],"readme":"# @compwright/worker-bee\n\n[![Build Status](https://travis-ci.org/compwright/worker-bee.png?branch=master)](https://travis-ci.org/compwright/worker-bee)\n[![Code Climate](https://codeclimate.com/github/compwright/worker-bee/badges/gpa.svg)](https://codeclimate.com/github/compwright/worker-bee)\n[![Test Coverage](https://codeclimate.com/github/compwright/worker-bee/badges/coverage.svg)](https://codeclimate.com/github/compwright/worker-bee/coverage)\n[![Dependency Status](https://img.shields.io/david/compwright/worker-bee.svg?style=flat-square)](https://david-dm.org/compwright/worker-bee)\n[![Download Status](https://img.shields.io/npm/dm/@compwright/worker-bee.svg?style=flat-square)](https://www.npmjs.com/package/@compwright/worker-bee)\n[![Sponsor on GitHub](https://img.shields.io/static/v1?label=Sponsor\u0026message=❤\u0026logo=GitHub\u0026link=https://github.com/sponsors/compwright)](https://github.com/sponsors/compwright)\n\nA process wrapper for [Bee-Queue](https://www.npmjs.com/package/bee-queue) workers.\n\n## Installation\n\n```\nnpm install --save @compwright/worker-bee\n```\n\n## Basic Usage\n\nSingle-threaded usage: \n\n```javascript\nconst Queue = require('bee-queue');\nconst Worker = require('@compwright/worker-bee');\n\nconst queue = new Queue('test-queue');\n\nworker = new Worker(queue);\n\nworker.start(async (job) =\u003e {\n  job.reportProgress(100);\n  console.log(`Job ${job.id} completed`);\n});\n```\n\nPressing CTRL+C or sending a SIGINT or SIGTERM signal will cause the worker to gracefully shut down and exit.\n\n## Cluster Usage\n\nBee-Queue supports workers in multiple processes or servers. Here is a multi-process worker example using the [throng](https://npmjs.org/package/throng) process manager:\n\n```javascript\nconst throng = require('throng');\nconst Queue = require('bee-queue');\nconst Worker = require('@compwright/worker-bee');\n\nfunction timeout(ms) {\n  return new Promise(resolve =\u003e setTimeout(resolve, ms));\n}\n\n// throng by default forks one worker per CPU\nthrong(pid =\u003e {\n  console.log(`Worker ${pid} started`);\n\n  const queue = new Queue('test-queue');\n\n  const logger = {\n    log: (...args) =\u003e console.log(`[${pid}]`, ...args),\n    error: (...args) =\u003e console.error(`[${pid}]`, ...args),\n  };\n\n  // handle six jobs concurrently per worker process\n  worker = new Worker(queue, { concurrency: 6, logger });\n\n  worker.start(async (job) =\u003e {\n    for (var i = 0; i \u003c 5; i++) {\n      job.reportProgress(100 * i / 5);\n    }\n    console.log(`Job ${job.id} completed`);\n  });\n});\n```\n\nThrong will relay the shutdown signal to each worker process to tell them to gracefully shut down and exit.\n\n## Documentation\n\n### `new Worker(queue, [options])`\n\nReturns a new worker instance initialized with the given options.\n\n__Options:__\n\n- `queue` - A Bee-Queue queue instance\n- `shutdownTimeout` (*optional*) - time to wait in milliseconds for worker processing to stop before terminating (see `Queue.close()`)\n- `stalledCheckInterval` (*optional*) - how often to check for stalled jobs in milliseconds (see `Queue.checkStalledJobs()`)\n- `concurrency` (*optional*) - how many jobs to process concurrently within the worker thread (see `Queue.process()`)\n- `logger` (*optional*) - logger instance to use instead of `console` (must be interface-compatible with `console`)\n\n### `worker.start(callbackFn)`\n\nListen for jobs to process.\n\n__Options:__\n\n- `callbackFn` - a function to execute the job. Receives the `job` as the first argument.\n\n### `worker.stop(error)`\n\nStop listening for jobs to process.\n\nCalled automatically on SIGINT or SIGTERM signals (such as CTRL+C), and if an uncaught exception occurs.\n\n__Options:__\n\n- `error` - an error object to associate with the shutdown. If passed, causes a non-zero exit code.\n\n## License\n\nCopyright (c) 2019\n\nLicensed under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompwright%2Fworker-bee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompwright%2Fworker-bee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompwright%2Fworker-bee/lists"}