{"id":30260677,"url":"https://github.com/modfin/pqdocket","last_synced_at":"2025-08-15T19:55:00.095Z","repository":{"id":309495396,"uuid":"1030077541","full_name":"modfin/pqdocket","owner":"modfin","description":"A simple Postgres-powered work queue based on lib/pq","archived":false,"fork":false,"pushed_at":"2025-08-12T06:42:49.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-12T08:31:18.753Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/modfin.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,"zenodo":null}},"created_at":"2025-08-01T03:57:48.000Z","updated_at":"2025-08-12T06:42:52.000Z","dependencies_parsed_at":"2025-08-12T08:31:20.725Z","dependency_job_id":"42a29033-2f45-434e-87f5-80613c807c17","html_url":"https://github.com/modfin/pqdocket","commit_stats":null,"previous_names":["modfin/pqdocket"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/modfin/pqdocket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modfin%2Fpqdocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modfin%2Fpqdocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modfin%2Fpqdocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modfin%2Fpqdocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modfin","download_url":"https://codeload.github.com/modfin/pqdocket/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modfin%2Fpqdocket/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270624169,"owners_count":24618262,"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-08-15T02:00:12.559Z","response_time":110,"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":[],"created_at":"2025-08-15T19:54:59.553Z","updated_at":"2025-08-15T19:55:00.027Z","avatar_url":"https://github.com/modfin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pqdocket\n[![build-and-test](https://github.com/modfin/pqdocket/actions/workflows/build-and-test.yaml/badge.svg)](https://github.com/modfin/pqdocket/actions/workflows/build-and-test.yaml)\n\n\nA simple Postgres-powered work queue based on `lib/pq`.\n\n## Design goals\n- Support long-running jobs, don't occupy a connection / transaction while a task is running.\n- Be able to schedule tasks at a timestamp in the future.\n- Fast task claiming based using `SELECT ... FOR UPDATE SKIP LOCKED`\n- Uses postgres `LISTEN/NOTIFY` to:\n  - Reduce polling while idle.\n  - Immediately begin processing tasks on all worker instances when tasks are scheduled, uses `LISTEN/NOTIFY` for this.\n- At-Least-Once execution, see notes below.\n\n\n## Notes on At-Least-Once execution\nWhen used with a correct setup and with well-behaved tasks, it typically will operate at Exactly-Once. But some problems can cause it to not be able to reach Exactly-Once execution. And then we choose At-Least-Once over At-Most-Once.\nFor example:\n- Postgres or the Go worker instances, crashing during task execution.\n- Buggy tasks that occasionally block / deadlock forever. The task will then after the claim time (task execution timeout) have expired, be scheduled again. \n- Tasks with too low claim time.\n- Tasks that don't extend their claim time if they run longer than expected.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodfin%2Fpqdocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodfin%2Fpqdocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodfin%2Fpqdocket/lists"}