Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix job failure for stately queues #493

Merged
merged 2 commits into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -983,10 +983,12 @@ Allowed policy values:

| Policy | Description |
| - | - |
| standard | (Default) Supports all standard features such as deferral, priority, and throttling |
| short | All standard features, but only allows 1 job to be queued, unlimited active. Can be extended with `singletonKey` |
| singleton | All standard features, but only allows 1 job to be active, unlimited queued. Can be extended with `singletonKey` |
| stately | Combination of short and singleton: Only allows 1 job per state, queued and/or active. Can be extended with `singletonKey` |
| `standard` | (Default) Supports all standard features such as deferral, priority, and throttling |
| `short` | All standard features, but only allows 1 job to be queued, unlimited active. Can be extended with `singletonKey` |
| `singleton` | All standard features, but only allows 1 job to be active, unlimited queued. Can be extended with `singletonKey` |
| `stately` | Combination of short and singleton: Only allows 1 job per state, queued and/or active. Can be extended with `singletonKey` |

> `stately` queues are special in how retries are handled. By definition, stately queues will not allow multiple jobs to occupy `retry` state. Once a job exists in `retry`, failing another `active` job will bypass the retry mechanism and force the job to `failed`. If this job requires retries, consider a custom retry implementation using a dead letter queue.

## `updateQueue(name, options)`

Expand Down
159 changes: 80 additions & 79 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"name": "pg-boss",
"version": "10.1.2",
"version": "10.1.3",
"description": "Queueing jobs in Postgres from Node.js like a boss",
"main": "./src/index.js",
"engines": {
"node": ">=20"
},
"dependencies": {
"cron-parser": "^4.0.0",
"pg": "^8.5.1",
"cron-parser": "^4.9.0",
"pg": "^8.12.0",
"serialize-error": "^8.1.0"
},
"devDependencies": {
"@types/node": "^20.3.3",
"luxon": "^3.0.1",
"mocha": "^10.0.0",
"@types/node": "^20.16.5",
"luxon": "^3.5.0",
"mocha": "^10.7.3",
"nyc": "^17.0.0",
"standard": "^17.0.0"
"standard": "^17.1.2"
},
"scripts": {
"test": "standard && mocha",
Expand Down
Loading