pg-boss 7.0.2 → 7.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -9
- package/package.json +1 -1
- package/types.d.ts +5 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@ Queueing jobs in Node.js using PostgreSQL like a boss.
|
|
|
2
2
|
|
|
3
3
|
[](http://www.postgresql.org)
|
|
4
4
|
[](https://badge.fury.io/js/pg-boss)
|
|
5
|
-
[](https://travis-ci.com/timgit/pg-boss)
|
|
5
|
+
[](https://app.travis-ci.com/github/timgit/pg-boss)
|
|
6
6
|
[](https://coveralls.io/github/timgit/pg-boss?branch=master)
|
|
7
7
|
|
|
8
8
|
```js
|
|
@@ -33,20 +33,19 @@ async function someAsyncJobHandler(job) {
|
|
|
33
33
|
|
|
34
34
|
pg-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.
|
|
35
35
|
|
|
36
|
-
pg-boss relies on [SKIP LOCKED](http://blog.2ndquadrant.com/what-is-select-skip-locked-for-in-postgresql-9-5), a feature
|
|
36
|
+
pg-boss relies on [SKIP LOCKED](http://blog.2ndquadrant.com/what-is-select-skip-locked-for-in-postgresql-9-5), a feature added to postgres specifically for message queues, in order to resolve record locking challenges inherent with relational databases. This brings the safety of guaranteed atomic commits of a relational database to your asynchronous job processing.
|
|
37
37
|
|
|
38
38
|
This 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.
|
|
39
39
|
|
|
40
40
|
## Features
|
|
41
|
-
* Backpressure-compatible
|
|
42
|
-
*
|
|
41
|
+
* Backpressure-compatible polling workers
|
|
42
|
+
* Cron scheduling
|
|
43
43
|
* Pub/sub API for fan-out queue relationships
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* Direct send, fetch and completion APIs for custom integrations
|
|
44
|
+
* Deferral, retries (with exponential backoff), rate limiting, debouncing
|
|
45
|
+
* Completion jobs for orchestrations/sagas
|
|
47
46
|
* Direct table access for bulk loads via COPY or INSERT
|
|
48
|
-
* Multi-master compatible
|
|
49
|
-
* Automatic
|
|
47
|
+
* Multi-master compatible (for example, in a Kubernetes ReplicaSet)
|
|
48
|
+
* Automatic creation and migration of storage tables
|
|
50
49
|
* Automatic maintenance operations to manage table growth
|
|
51
50
|
|
|
52
51
|
## Requirements
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -203,7 +203,7 @@ declare namespace PgBoss {
|
|
|
203
203
|
done: JobDoneCallback<ResData>;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
interface
|
|
206
|
+
interface MonitorState {
|
|
207
207
|
all: number;
|
|
208
208
|
created: number;
|
|
209
209
|
retry: number;
|
|
@@ -212,7 +212,10 @@ declare namespace PgBoss {
|
|
|
212
212
|
expired: number;
|
|
213
213
|
cancelled: number;
|
|
214
214
|
failed: number;
|
|
215
|
-
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
interface MonitorStates extends MonitorState {
|
|
218
|
+
queues: { [queueName: string]: MonitorState };
|
|
216
219
|
}
|
|
217
220
|
|
|
218
221
|
interface Worker {
|