{"id":20228634,"url":"https://github.com/ivanvs/pidginmq","last_synced_at":"2026-02-17T19:01:59.017Z","repository":{"id":243728486,"uuid":"771233355","full_name":"ivanvs/pidginmq","owner":"ivanvs","description":"PidginMQ is a job queu and task scheduling library for Node.js and JavaScript, built on PostgreSQL.","archived":false,"fork":false,"pushed_at":"2024-09-26T22:30:18.000Z","size":1124,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T15:21:33.561Z","etag":null,"topics":["job-queue","job-scheduler","pidgin-queue","pidginmq","pidginmq-queue","postgre-queue","postgresql","worker-queue"],"latest_commit_sha":null,"homepage":"https://pidginmq.com/","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/ivanvs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2024-03-12T23:30:19.000Z","updated_at":"2024-09-26T22:30:21.000Z","dependencies_parsed_at":"2024-06-10T22:44:38.664Z","dependency_job_id":"7a0ce6df-0668-4531-80be-9ac0a7bdc217","html_url":"https://github.com/ivanvs/pidginmq","commit_stats":null,"previous_names":["ivanvs/pidginmq"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanvs%2Fpidginmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanvs%2Fpidginmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanvs%2Fpidginmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanvs%2Fpidginmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivanvs","download_url":"https://codeload.github.com/ivanvs/pidginmq/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248262051,"owners_count":21074240,"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","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-queue","job-scheduler","pidgin-queue","pidginmq","pidginmq-queue","postgre-queue","postgresql","worker-queue"],"created_at":"2024-11-14T07:31:50.527Z","updated_at":"2025-04-10T17:38:17.142Z","avatar_url":"https://github.com/ivanvs.png","language":"TypeScript","readme":"# PidginMQ\n\n![PidginMQ](/images/pidginmq.png)\n\nPidginMQ is a job queuing and task scheduling library for Node.js and JavaScript, built on PostgreSQL.\n\nThe library is heavily inspired by [River](https://riverqueue.com/)\n\n[![PostgreSQL Version](https://img.shields.io/badge/PostgreSQL-11+-blue.svg?maxAge=2592000)](http://www.postgresql.org)\n[![npm version](https://badge.fury.io/js/pidginmq.svg)](https://badge.fury.io/js/pidginmq)\n\n[Documentation](https://pidginmq.com)\n\n## Installation\n\nYARN:\n\n```bash\nyarn add pidginmq\n```\n\nNPM:\n\n```bash\nnpm install pidginmq -S\n```\n\n## Requirements\n\n- Node 18 or higher\n- PostgreSQL 11 or higher\n\n## Features\n\n- Cron scheduling\n- Recurring Jobs\n- Deferred jobs\n- Automatic retries (with exponential backoff)\n- Configurable job timeouts\n- Direct table access for bulk loads\n\n## Database initialization\n\nPidginMQ requires specific database tables to function properly. To facilitate this, PidginMQ includes a command-line tool that executes the necessary migrations.\n\nWhen you install the library, the CLI tool is installed automatically\n\nCLI tool containse 3 commands:\n\n- `up` - running next migration\n- `down` - will undo last migration\n- `current` - return current migration version\n\nFor all 3 commands we need to supply [database connection url](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS).\n\n### pidginmq up\n\n```bash\npidginmq up postgresql://other@localhost/otherdb\n```\n\nResult:\n\n```bash\nPidginMQ database schema is migrated to version: 001\n```\n\n### pidginmq down\n\n```bash\npidginmq down postgresql://other@localhost/otherdb\n```\n\nResult:\n\n```bash\nPidginMQ database schema is downgraded to version: none\n```\n\n### pidginmq current\n\n```bash\npidginmq down postgresql://other@localhost/otherdb\n```\n\nResult:\n\n```bash\nCurrent database migration version: 001\n```\n\n## Examples\n\nInitialize the schema for PidginMQ in the database by running the CLI tool.\n\nCreate a client:\n\n```js\n    const options = {\n      workers: new Workers(),\n      queues: new Map\u003cstring, QueueConfig\u003e(),\n      dbUri: 'postgresql://pidginmq:Password1@localhost:5432/pidginmq',\n    };\n    this.client = new Client(options);\n    this.client.start();\n```\n\nStop the client:\n\n```js\nthis.client.stop();\n```\n\nAdd a worker:\n\n```js\nthis.client.addWorker('test', (job) =\u003e {\n  console.info(`Processing job:`, JSON.stringify(job));\n});\n```\n\nAdd a job:\n\n```js\nawait this.client.addJob({\n  kind: 'test',\n  queue: 'test-queue',\n});\n```\n\n## Contributing\n\nTo setup a development environment for this library:\n\n```bash\ngit clone https://github.com/ivanvs/pidginmq.git\nnpm install\n```\n\nTo run the test suite and code coverage:\n\n```bash\nnpm run test:cov\n```\n\n# License\n\nPidginMQ is released under [MIT License](https://opensource.org/licenses/MIT).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanvs%2Fpidginmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivanvs%2Fpidginmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanvs%2Fpidginmq/lists"}