chore(deps): update dependency pg-boss to v10 #44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^8.4.1 || ^9.0.0
->^8.4.1 || ^9.0.0 || ^10.0.0
9.0.3
->10.1.5
Release Notes
timgit/pg-boss (pg-boss)
v10.1.5
Compare Source
What's Changed
Full Changelog: timgit/pg-boss@10.1.4...10.1.5
v10.1.4
Compare Source
What's Changed
Full Changelog: timgit/pg-boss@10.1.3...10.1.4
v10.1.3
Compare Source
What's Changed
Full Changelog: timgit/pg-boss@10.1.2...10.1.3
v10.1.2
Compare Source
What's Changed
expireInSeconds
in theJob
type by @abdel in https://github.com/timgit/pg-boss/pull/489New Contributors
Full Changelog: timgit/pg-boss@10.1.1...10.1.2
v10.1.1
Compare Source
What's Changed
Full Changelog: timgit/pg-boss@10.1.0...10.1.1
v10.1.0
Compare Source
What's Changed
Full Changelog: timgit/pg-boss@10.0.6...10.1.0
v10.0.6
Compare Source
What's Changed
Full Changelog: timgit/pg-boss@10.0.5...10.0.6
v10.0.5
Compare Source
What's Changed
Full Changelog: timgit/pg-boss@10.0.4...10.0.5
v10.0.4
Compare Source
What's Changed
Full Changelog: timgit/pg-boss@10.0.3...10.0.4
v10.0.3
Compare Source
What's Changed
priority: false
option infetch()
andwork()
Full Changelog: timgit/pg-boss@10.0.2...10.0.3
v10.0.2
Compare Source
What's Changed
New Contributors
Full Changelog: timgit/pg-boss@10.0.1...10.0.2
v10.0.1
Compare Source
start()
resolves instance after startedFull Changelog: timgit/pg-boss@10.0.0...10.0.1
v10.0.0
Compare Source
MAJOR: Node 20 is now the minimum required version
MAJOR: PostgreSQL 13 is now the minimum required version. The dependency on the pgcrypto extension has been removed.
MAJOR: Automatic migration from v9 or lower is not currently available. A new partitioned job table was created, as well as new queue storage policies that make it difficult to honor the previous unique constraints in an upgrade scenario. The safest option is to manually move jobs from pgboss 9 to v10 via the API, or at least use the API to prepare for a manual migration via
INSERT ... SELECT
.MAJOR: Job retries are now opt-out instead of opt-in. The default
retryLimit
is now 2 retries. This will cause an issue for any job handlers that aren't idempotent. Consider settingretryLimit=0
on these queues if needed.MAJOR: Queues must now be created before API or direct SQL INSERT will work. See migration notes below. Each queue has a storage policy (see below) and represents a child table in a partitioning hierarchy. Additionally, queues store default retry and retention policies that will be auto-applied to all new jobs. See the docs for more on queue operation such as `createQueue().
standard
(default): Standard queues are the default queue policy, which supports all existing features. This will provision a dedicated job partition for all jobs with this name.short
: Short queues only allow 1 item to be queued (in created state), which replaces the previoussendSingleton()
andsendOnce()
functions.singleton
: Singleton queues only allow 1 item to be active, which replaces the previousfetch()
optionenforceSingletonQueueActiveLimit
.stately
: Stately queues are a combination ofshort
andsingleton
, only allowing 1 job to be queued and 1 job active.MAJOR: The handler function in
work()
was standardized to always receive an array of jobs. One simple way to migrate a single job handler (batchSize=1) is a destructuring assignment like the following.MAJOR:
teamSize
,teamConcurrency
, andteamRefill
were removed fromwork()
to simplify worker polling use cases. As noted above,enforceSingletonQueueActiveLimit
was also removed.MAJOR: Dead letter queues replace completion jobs. Failed jobs will be added to optional dead letter queues after exhausting all retries. This is preferred over completion jobs to gain retry support via
work()
. Additionally, dead letter queues only make a copy of the job if it fails, instead of filling up the job table with numerous, mostly unneeded completion jobs.onComplete
option insend()
andinsert()
has been removedonComplete()
,offComplete()
, andfetchCompleted()
have been removeddeadLetter
option added tosend()
andinsert()
andcreateQueue()
MAJOR: Dropped the following API functions in favor of policy queues
sendOnce()
sendSingleton()
MAJOR: The following API functions now require name arguments
complete(name, id, data)
fail(name, id, data)
cancel(name, id)
getJobById(name, id)
MAJOR: The contract for
getJobById()
and theincludeMetadata
option forfetch()
andwork()
were standardized to the following.MAJOR: The columns in the job and archive table were renamed to standardize to snake case. A sample job table script showing these is below.
MAJOR:
work()
optionsnewJobCheckInterval
andnewJobCheckIntervalSeconds
have been replaced bypollingIntervalSeconds
. The minimum value is 0.5, making 500ms the minimum allowed value.MAJOR:
stop()
optiondestroy
was renamed toclose
. Previously,destroy
was defaulted to false, to leave the internal connection database open which was created bystart()
. Now,close
will default to true.MAJOR:
noSupervisor
andnoScheduling
were renamed to a more intuitive naming convention.noSupervisor: true
to disable mainteance, instead usesupervise: false
noScheduling: true
to disable scheduled cron jobs, useschedule: false
MINOR: Added new function
deleteJob()
to provide fetch -> delete semantics when job throttling and/or storage is not desired.MINOR:
send()
andinsert()
cascade configuration from policy queues (if they exist) and then global settings in the constructor. Use the following table to help identify which settings are inherited and when.retryLimit
send()
,insert()
,createQueue()
retryDelay
send()
,insert()
,createQueue()
retryBackoff
send()
,insert()
,createQueue()
expireInSeconds
send()
,insert()
,createQueue()
expireInMinutes
send()
,createQueue()
expireInHours
send()
,createQueue()
retentionSeconds
send()
,createQueue()
retentionMinutes
send()
,createQueue()
retentionHours
send()
,createQueue()
retentionDays
send()
,createQueue()
deadLetter
send()
,insert()
,createQueue()
MINOR: Added primary key to job archive to support replication use cases such as read replicas or high availability standbys.
MINOR: Added a new constructor option,
migrate:false
, to block an instance from attempting to migrate to the latest database schema version. This is useful if the configured credentials don't have schema modification privileges or complete control of when and how migrations are run is required.MINOR: The
expired
failed state has been consolidated intofailed
for simplicity.MINOR: Added
priority:false
option towork()
andfetch()
to opt out of priority sorting during job fetching. If a queue is very large and not using the priority feature, this may help job fetch performance.MINOR: Added a maintenance function,
maintain()
, if needed for serverless and/or externally scheduled maintenance use cases.MINOR: Added functions
isInstalled()
andschemaVersion()
MINOR:
stop()
will now wait for the default graceful stop timeout (30s) before resolving its promise. Thestopped
event will still emit. If you want to the original behavior, set the newwait
option tofalse
.MINOR: Added
id
property as an option tosend()
for pre-assigning the job id. Previously, onlyinsert()
supported pre-assignment.MINOR: Removed internal usage of md5() hashing function for those needing FIPS compliance.
Migration Notes
This section will contain notes and tips on different migration strategies from v9 and below to v10. Since auto-migration is not supported, there are a few manual options to get all of your jobs into v10 from v9.
API option
For each queue, use
createQueue()
,fetch()
,insert()
to pull jobs from v9 and insert into v10.SQL option
Something along the lines of
INSERT INTO v10.job (...) SELECT ... FROM v9.job
is possible in SQL, but the queues have to be created first.SELECT pgboss.create_queue(name, options)
.pgboss.job
.Hybrid option
What's Changed
New Contributors
Full Changelog: timgit/pg-boss@9.0.3...10.0.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.