pg-boss 10.0.0-beta4 → 10.0.0-beta5

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 CHANGED
@@ -15,10 +15,6 @@ async function readme() {
15
15
 
16
16
  const queue = 'readme-queue'
17
17
 
18
- try {
19
- await boss.createQueue(queue)
20
- } catch {}
21
-
22
18
  const id = await boss.send(queue, { arg1: 'read me' })
23
19
 
24
20
  console.log(`created job ${id} in queue ${queue}`)
@@ -47,7 +43,7 @@ This will likely cater the most to teams already familiar with the simplicity of
47
43
 
48
44
  ## Requirements
49
45
  * Node 20 or higher
50
- * PostgreSQL 12 or higher
46
+ * PostgreSQL 13 or higher
51
47
 
52
48
  ## Installation
53
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pg-boss",
3
- "version": "10.0.0-beta4",
3
+ "version": "10.0.0-beta5",
4
4
  "description": "Queueing jobs in Postgres from Node.js like a boss",
5
5
  "main": "./src/index.js",
6
6
  "engines": {
package/src/plans.js CHANGED
@@ -174,7 +174,7 @@ function getPartitionFunction (schema) {
174
174
  return `
175
175
  CREATE FUNCTION ${schema}.get_partition(queue_name text, out name text) AS
176
176
  $$
177
- SELECT '${schema}.job_' || encode(digest(queue_name, 'sha1'), 'hex');
177
+ SELECT '${schema}.job_' || encode(sha224(queue_name::bytea), 'hex');
178
178
  $$
179
179
  LANGUAGE SQL
180
180
  IMMUTABLE
@@ -769,7 +769,7 @@ function locked (schema, query) {
769
769
 
770
770
  function advisoryLock (schema, key) {
771
771
  return `SELECT pg_advisory_xact_lock(
772
- ('x' || encode(digest(current_database() || '.pgboss.${schema}${key || ''}', 'sha256'), 'hex'))::bit(64)::bigint
772
+ ('x' || encode(sha224((current_database() || '.pgboss.${schema}${key || ''}')::bytea), 'hex'))::bit(64)::bigint
773
773
  )`
774
774
  }
775
775