v2.15.2
Enhancements
-
[Repo] Pass
oban: true
option to all queries.Telemetry options are exposed in Ecto instrumentation but aren't obviously available in the opts passed to
prepare_query
. Now all queries have anoban: true
option so users can ignore them in multi-tenancy setups. -
[Engine] Generate a UUID for all
Basic
andLite
queue instances to aid in identifying orphaned jobs or churning queue producers. -
[Oban] Use
Logger.warning/2
and replace deprecated use of:warn
level with:warning
across all modules.
Bug Fixes
-
[Job] Validate changesets during
Job.to_map/1
conversionThe
Job.to_map/1
function converts jobs to a map "entry" suitable for use ininsert_all
. Previously, that function didn't perform any validation and would allow inserting (or attempting to insert) invalid jobs duringinsert_all
. Aside from inconsistency withinsert
andinsert!
,insert_all
could insert invalid jobs that would never run successfully.Now
to_map/1
usesapply_action!/2
to apply the changeset with validation and raises an exception identical toinsert!
, but before calling the database. -
[Notifier] Store PG notifier state in the registry for non-blocking lookup
We pull the state from the notifier's registry metadata to avoid
GenServer.call
timeouts when the system is under high load. -
[Migration] Add
primary_key
explicitly during SQLite3 migrationsIf a user has configured Ecto's
:migration_primary_key
to something other thanbigserial
the schema is incompatible with Oban's job schema.