{"id":13402398,"url":"https://github.com/timgit/pg-boss","last_synced_at":"2026-06-10T21:01:12.675Z","repository":{"id":37271138,"uuid":"52692900","full_name":"timgit/pg-boss","owner":"timgit","description":"Queueing jobs in Postgres from Node.js like a boss","archived":false,"fork":false,"pushed_at":"2026-05-02T02:06:37.000Z","size":3561,"stargazers_count":3470,"open_issues_count":41,"forks_count":241,"subscribers_count":23,"default_branch":"master","last_synced_at":"2026-05-03T00:33:23.498Z","etag":null,"topics":["job","node","nodejs","postgres","postgresql","queue"],"latest_commit_sha":null,"homepage":"https://timgit.github.io/pg-boss/","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/timgit.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"timgit"}},"created_at":"2016-02-27T22:55:12.000Z","updated_at":"2026-05-02T20:30:46.000Z","dependencies_parsed_at":"2022-07-12T05:18:28.456Z","dependency_job_id":"4c610391-fb1d-4c22-b7b6-2519565928d6","html_url":"https://github.com/timgit/pg-boss","commit_stats":{"total_commits":804,"total_committers":54,"mean_commits":14.88888888888889,"dds":"0.26119402985074625","last_synced_commit":"463f2fc892895b7d0c14e91574c66e4e565b1638"},"previous_names":[],"tags_count":203,"template":false,"template_full_name":null,"purl":"pkg:github/timgit/pg-boss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timgit%2Fpg-boss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timgit%2Fpg-boss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timgit%2Fpg-boss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timgit%2Fpg-boss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timgit","download_url":"https://codeload.github.com/timgit/pg-boss/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timgit%2Fpg-boss/sbom","scorecard":{"id":885973,"data":{"date":"2025-08-11","repo":{"name":"github.com/timgit/pg-boss","commit":"6d4c88633285d08311efb99fd6efe6ad04d2f41f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.6,"checks":[{"name":"Code-Review","score":3,"reason":"Found 10/28 approved changesets -- score normalized to 3","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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"Maintained","score":10,"reason":"7 commit(s) and 18 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/timgit/pg-boss/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/timgit/pg-boss/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/timgit/pg-boss/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/timgit/pg-boss/ci.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:39","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"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":"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":"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":"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 20 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":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"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-24T10:03:55.294Z","repository_id":37271138,"created_at":"2025-08-24T10:03:55.294Z","updated_at":"2025-08-24T10:03:55.294Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34170161,"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-06-10T02:00:07.152Z","response_time":89,"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":["job","node","nodejs","postgres","postgresql","queue"],"created_at":"2024-07-30T19:01:15.512Z","updated_at":"2026-06-10T21:01:12.668Z","avatar_url":"https://github.com/timgit.png","language":"TypeScript","funding_links":["https://github.com/sponsors/timgit"],"categories":["JavaScript","Queuing","TypeScript","\u003ca name=\"TypeScript\"\u003e\u003c/a\u003eTypeScript","Work Queues"],"sub_categories":["Logical Replication"],"readme":"Queueing jobs in Postgres from Node.js like a boss.\n\n[![NPM](https://nodei.co/npm/pg-boss.svg?style=shields\u0026color=blue)](https://nodei.co/npm/pg-boss/)\n[![Build](https://github.com/timgit/pg-boss/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/timgit/pg-boss/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/timgit/pg-boss/badge.svg?branch=master)](https://coveralls.io/github/timgit/pg-boss?branch=master)\n\n```js\nasync function readme() {\n  const { PgBoss } = require('pg-boss');\n  const boss = new PgBoss('postgres://user:pass@host/database');\n\n  boss.on('error', console.error)\n\n  await boss.start()\n\n  const queue = 'readme-queue'\n\n  await boss.createQueue(queue)\n\n  const id = await boss.send(queue, { arg1: 'read me' })\n\n  console.log(`created job ${id} in queue ${queue}`)\n\n  await boss.work(queue, async ([ job ]) =\u003e {\n    console.log(`received job ${job.id} with data ${JSON.stringify(job.data)}`)\n  })\n}\n\nreadme()\n  .catch(err =\u003e {\n    console.log(err)\n    process.exit(1)\n  })\n```\n\npg-boss is a job queue built in Node.js on top of PostgreSQL in order to provide background processing and reliable asynchronous execution to Node.js applications.\n\npg-boss relies on Postgres's SKIP LOCKED, a feature built specifically for message queues to resolve record locking challenges inherent with relational databases. This provides exactly-once delivery and the safety of guaranteed atomic commits to asynchronous job processing.\n\nThis will likely cater the most to teams already familiar with the simplicity of relational database semantics and operations (SQL, querying, and backups). It will be especially useful to those already relying on PostgreSQL that want to limit how many systems are required to monitor and support in their architecture.\n\n\n## Summary\n* Exactly-once job delivery\n* Create jobs within your existing database transaction\n* Backpressure-compatible polling workers\n* Cron scheduling\n* Queue storage policies to support a variety of rate limiting, debouncing, and concurrency use cases\n* Priority queues, dead letter queues, job deferral, automatic retries with exponential backoff\n* Pub/sub API for fan-out queue relationships\n* SQL support for non-Node.js runtimes for most operations\n* Serverless function compatible\n* Multi-master compatible (for example, in a Kubernetes ReplicaSet)\n\n## CLI\n\npg-boss includes a command-line interface if needed for managing database migrations without writing code. This is useful for CI/CD pipelines, database setup scripts, or manual schema management.\n\nSee the [CLI documentation](https://timgit.github.io/pg-boss/cli) for details.\n\n## Dashboard\n\nA web-based dashboard is available in the [`@pg-boss/dashboard`](https://www.npmjs.com/package/@pg-boss/dashboard) package for monitoring and managing jobs, queues and schedules.\n\nSee the [dashboard documentation](https://github.com/timgit/pg-boss/blob/master/packages/dashboard/README.md) for full configuration and deployment options.\n\n## Proxy\n\nA HTTP proxy is available in the [`@pg-boss/proxy`](https://www.npmjs.com/package/@pg-boss/proxy) package if needed to support use cases such as platform compatibility and connection pooling or scalability.\n\nSee the [proxy documentation](https://github.com/timgit/pg-boss/blob/master/packages/proxy/README.md) for full configuration and deployment options.\n\n## ORM Transaction Adapters\n\npg-boss ships adapters for running operations inside ORM-managed transactions.  Each adapter wraps the ORM's transaction object as an `IDatabase` you can pass via the `db` option on `send()`, `insert()`, `fetch()`, `complete()`, and other methods.\n\n### Knex / Kysely / Prisma\n\n```ts\nimport { fromKnex, fromKysely, fromPrisma } from 'pg-boss'\n```\n\n```ts\n// Knex\nawait knex.transaction(async (trx) =\u003e {\n  await boss.send('my-queue', data, { db: fromKnex(trx) })\n})\n\n// Kysely\nawait db.transaction().execute(async (trx) =\u003e {\n  await boss.send('my-queue', data, { db: fromKysely(trx) })\n})\n\n// Prisma (v7+ with @prisma/adapter-pg)\nawait prisma.$transaction(async (tx) =\u003e {\n  await boss.send('my-queue', data, { db: fromPrisma(tx) })\n})\n```\n\n### Drizzle\n\nThe Drizzle adapter accepts the `sql` tagged-template function from `drizzle-orm` as a second argument so it can construct parameterised queries without a runtime dependency on `drizzle-orm`.\n\n```ts\nimport { fromDrizzle } from 'pg-boss'\nimport { sql } from 'drizzle-orm'\n```\n\n```ts\nawait db.transaction(async (tx) =\u003e {\n  await boss.send('my-queue', data, { db: fromDrizzle(tx, sql) })\n})\n```\n\n## Requirements\n* Node 22.12 or higher for CommonJS's require(esm)\n* PostgreSQL 13 or higher\n\n## Documentation\n* [Docs](https://timgit.github.io/pg-boss/)\n\n## Contributing\nTo setup a development environment for this library:\n\n```bash\ngit clone https://github.com/timgit/pg-boss.git\nnpm install\n```\n\nTo run the test suite, linter and code coverage:\n```bash\nnpm run cover\n```\n\nThe test suite will try and create a new database named pgboss. The [config.json](https://github.com/timgit/pg-boss/blob/master/test/config.json) file has the default credentials to connect to postgres.\n\nThe [Docker Compose](https://github.com/timgit/pg-boss/blob/master/docker-compose.yaml) file can be used to start a local postgres instance for testing:\n\n```bash\ndocker compose up\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimgit%2Fpg-boss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimgit%2Fpg-boss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimgit%2Fpg-boss/lists"}