pg-boss 11.0.0 → 11.0.2
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/package.json +1 -1
- package/src/attorney.js +10 -2
- package/src/plans.js +1 -1
package/package.json
CHANGED
package/src/attorney.js
CHANGED
|
@@ -130,7 +130,7 @@ function getConfig (value) {
|
|
|
130
130
|
config.migrate = ('migrate' in config) ? config.migrate : true
|
|
131
131
|
|
|
132
132
|
applySchemaConfig(config)
|
|
133
|
-
|
|
133
|
+
applyOpsConfig(config)
|
|
134
134
|
applyScheduleConfig(config)
|
|
135
135
|
validateWarningConfig(config)
|
|
136
136
|
|
|
@@ -201,7 +201,15 @@ function applyPollingInterval (config) {
|
|
|
201
201
|
: 2000
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
function
|
|
204
|
+
function applyOpsConfig (config) {
|
|
205
|
+
assert(!('superviseIntervalSeconds' in config) || config.superviseIntervalSeconds >= 1,
|
|
206
|
+
'configuration assert: superviseIntervalSeconds must be at least every second')
|
|
207
|
+
|
|
208
|
+
config.superviseIntervalSeconds = config.superviseIntervalSeconds || 60
|
|
209
|
+
|
|
210
|
+
assert(config.superviseIntervalSeconds / 60 / 60 <= POLICY.MAX_EXPIRATION_HOURS,
|
|
211
|
+
`configuration assert: superviseIntervalSeconds cannot exceed ${POLICY.MAX_EXPIRATION_HOURS} hours`)
|
|
212
|
+
|
|
205
213
|
assert(!('maintenanceIntervalSeconds' in config) || config.maintenanceIntervalSeconds >= 1,
|
|
206
214
|
'configuration assert: maintenanceIntervalSeconds must be at least every second')
|
|
207
215
|
|
package/src/plans.js
CHANGED
|
@@ -715,7 +715,7 @@ function insertJobs (schema, { table, name, returnId = true }) {
|
|
|
715
715
|
WHEN right("startAfter", 1) = 'Z' THEN CAST("startAfter" as timestamp with time zone)
|
|
716
716
|
ELSE now() + CAST(COALESCE("startAfter",'0') as interval)
|
|
717
717
|
END as start_after
|
|
718
|
-
FROM json_to_recordset($1) as x (
|
|
718
|
+
FROM json_to_recordset($1::json) as x (
|
|
719
719
|
id uuid,
|
|
720
720
|
name text,
|
|
721
721
|
priority integer,
|