Comparing version 10.0.5 to 10.0.6
{ | ||
"name": "pg-boss", | ||
"version": "10.0.5", | ||
"version": "10.0.6", | ||
"description": "Queueing jobs in Postgres from Node.js like a boss", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -1,2 +0,2 @@ | ||
const assert = require('assert') | ||
const assert = require('node:assert') | ||
const { DEFAULT_SCHEMA } = require('./plans') | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
const EventEmitter = require('events') | ||
const EventEmitter = require('node:events') | ||
const plans = require('./plans') | ||
@@ -3,0 +3,0 @@ const { delay } = require('./tools') |
@@ -1,2 +0,2 @@ | ||
const assert = require('assert') | ||
const assert = require('node:assert') | ||
const plans = require('./plans') | ||
@@ -49,4 +49,3 @@ const { DEFAULT_SCHEMA } = plans | ||
if (schemaVersion > version) { | ||
throw new Error('Migrations are not supported to v10') | ||
// await this.migrate(version) | ||
await this.migrate(version) | ||
} | ||
@@ -90,13 +89,13 @@ } else { | ||
// async next (version) { | ||
// const commands = migrationStore.next(this.config.schema, version, this.migrations) | ||
// await this.db.executeSql(commands) | ||
// } | ||
async next (version) { | ||
const commands = migrationStore.next(this.config.schema, version, this.migrations) | ||
await this.db.executeSql(commands) | ||
} | ||
// async rollback (version) { | ||
// const commands = migrationStore.rollback(this.config.schema, version, this.migrations) | ||
// await this.db.executeSql(commands) | ||
// } | ||
async rollback (version) { | ||
const commands = migrationStore.rollback(this.config.schema, version, this.migrations) | ||
await this.db.executeSql(commands) | ||
} | ||
} | ||
module.exports = Contractor |
@@ -1,2 +0,2 @@ | ||
const EventEmitter = require('events') | ||
const EventEmitter = require('node:events') | ||
const pg = require('pg') | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
const EventEmitter = require('events') | ||
const EventEmitter = require('node:events') | ||
const plans = require('./plans') | ||
@@ -3,0 +3,0 @@ const Attorney = require('./attorney') |
@@ -1,4 +0,4 @@ | ||
const assert = require('assert') | ||
const EventEmitter = require('events') | ||
const { randomUUID } = require('crypto') | ||
const assert = require('node:assert') | ||
const EventEmitter = require('node:events') | ||
const { randomUUID } = require('node:crypto') | ||
const { serializeError: stringify } = require('serialize-error') | ||
@@ -5,0 +5,0 @@ const { delay } = require('./tools') |
@@ -1,2 +0,2 @@ | ||
const assert = require('assert') | ||
const assert = require('node:assert') | ||
const plans = require('./plans') | ||
@@ -67,3 +67,14 @@ | ||
return [ | ||
{ | ||
release: '10.0.6', | ||
version: 22, | ||
previous: 21, | ||
install: [ | ||
`ALTER TABLE ${schema}.job ALTER COLUMN retry_limit SET DEFAULT 2` | ||
], | ||
uninstall: [ | ||
`ALTER TABLE ${schema}.job ALTER COLUMN retry_limit SET DEFAULT 0` | ||
] | ||
} | ||
] | ||
} |
@@ -68,3 +68,3 @@ const DEFAULT_SCHEMA = 'pgboss' | ||
const assert = require('assert') | ||
const assert = require('node:assert') | ||
@@ -183,3 +183,3 @@ function create (schema, version) { | ||
state ${schema}.job_state not null default('${JOB_STATES.created}'), | ||
retry_limit integer not null default(0), | ||
retry_limit integer not null default(2), | ||
retry_count integer not null default(0), | ||
@@ -186,0 +186,0 @@ retry_delay integer not null default(0), |
@@ -1,2 +0,2 @@ | ||
const EventEmitter = require('events') | ||
const EventEmitter = require('node:events') | ||
const plans = require('./plans') | ||
@@ -3,0 +3,0 @@ const cronParser = require('cron-parser') |
@@ -6,3 +6,3 @@ module.exports = { | ||
function delay (ms, error) { | ||
const { setTimeout } = require('timers/promises') | ||
const { setTimeout } = require('node:timers/promises') | ||
const ac = new AbortController() | ||
@@ -9,0 +9,0 @@ |
{ | ||
"schema": 21 | ||
"schema": 22 | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
96512
2619