chore(deps): update dependency oban to v2.19.1 #76
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:
2.18.3
->2.19.1
Release Notes
oban-bg/oban (oban)
v2.19.1
Compare Source
Bug Fixes
[Mix] Improve igniter installer idempotency and compatibility.
The installer now uses
on_exists: :skip
when generating a migration, so it composes safelywith other igniter installers. It also removes unnecessary
add_dep
calls that would overwritea previously specified Oban version with
~> 2.18
.v2.19.0
Compare Source
Enhancements
[Oban] Start all queues in parallel on initialization.
The midwife now starts queues using an async stream to parallelize startup and minimize boot
time for applications with many queues.
[Oban] Safely return
nil
fromcheck_queue/2
when checking queues that aren't running.Checking on a queue that wasn't currently running on the local node now returns
nil
ratherthan causing a crash. This makes it safer to check the whether a queue is running at all without
a
try/catch
clause.[Oban] Add
check_all_queues/1
to gather all queue status in a single function.This new helper gathers the "check" details from all running queues on the local node. While it
was previously possible to pull the queues list from config and call
check_queue/2
on eachentry, this more accurately pulls from the registry and checks each producer concurrently.
[Oban] Add
delete_job/2
anddelete_all_jobs/2
operations.This adds
Oban.delete_job/2
,Oban.delete_all_jobs/2
, Engine callbacks, and associatedoperations for all native engines. Deleting jobs is now easier and safer, due to automatic state
protections.
[Engine] Record when a queue starts shutting down
Queue producer metadata now includes a
shutdown_started_at
field to indicate that a queueisn't just paused, but is actually shutting down as well.
[Engine] Add
rescue_jobs/3
callback for all engines.The
Lifeline
plugin formerly used two queries to rescue jobs—one to mark jobs with remainingattempts as
available
and another thatdiscarded
the remaining stuck jobs. Those are nowcombined into a single callback, with the base definition in the
Basic
engine.MySQL won't accept a select in an update statement. The Dolphin implementation of
rescue_jobs/3
uses multiple queries to return the relevant telemetry data and make multipleupdates.
[Cron] Introduce
Oban.Cron
withschedule_interval/4
The new
Cron
module allows processes, namely plugins, to get cron-like scheduled functionalitywith a single function call. This will allow plugins to removes boilerplate around parsing,
scheduling, and evaluating for cron behavior.
[Registry] Add
select/1
to simplify querying for registered modules.[Testing] Add
build_job/3
helper for easier testing.Extract the mechanism for verifying and building jobs out of
perform_job/3
so that it's usablein isolation. This also introduces
perform_job/2
for executing built jobs.[Telemetry] Add information on leadership changes to
oban.peer.election
event.An additional
was_leader?
field is included in[:oban, :peer, :election | _]
event metadatato make hooking into leadership change events simpler.
[Telemetry] Add callback powered logging for plugin events.
Events are now logged for plugins that implement the a new optional callback, and exceptions are
logged for all plugins regardless of whether they implement the callback.
This adds logging for
Cron
,Lifeline
,Pruner
,Stager
, andReindexer
.[Telemetry] Add peer election logging to default logger.
The default logger now includes leadership events to make identifying the leader, and leadership
changes between nodes, easier.
[Telemetry] Add option to restrict logging to certain events.
Logging in a busy system may be noisy due to job events, but there are other events that are
particularly useful for diagnosing issues. This adds an
events
option toattach_default_logger/1
to allow selective event logging.[Telemetry] Expose
default_handler_id/0
for telemetry testing.Simplifies testing whether the default logger is attached or detached in application code.
Chores
Postgres
toDatabase
because it isalso used for MySQL databases.
Bug Fixes
[Oban] Allow overwriting all
insert/*
functions arities afteruse Oban
.[Node] Correctly handle
:node
option forscale_queue/2
Scoping
scale_queue/2
calls to a single node didn't work as advertised due to some extravalidation for producer meta compatibility.
[Migration] Fix version query for databases with non-unique
oid
Use
pg_catalog.obj_description(object_oid, catalog_name)
, introduced in PostgreSQL 7.2, tospecify the
pg_class
catalog so only theoban_jobs
description is returned.[Pruner] Use state specific fields when querying for prunable jobs.
Using
scheduled_at
is not correct in all situations. Depending on job state, one ofcancelled_at
,discarded_at
, orscheduled_at
should be used.[Peer] Conditionally return the current node as leader for isolated peers.
Prevents returning the current node name when leadership is disabled.
[Testing] Retain time as microseconds for
scheduled_at
tests.Include microseconds in the
begin
anduntil
times used for scheduled_at tests with a delta.The prior version would truncate, which rounded the
until
down and broke microsecond levelchecks.
[Telemetry] Correct spelling of "elapsed" in
oban.queue.shutdown
metadata.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 this update again.
This PR was generated by Mend Renovate. View the repository job log.