oban v2.11.0 Release Notes
Release Date: 2022-02-13 // about 2 years ago-
โจ Enhancements
- [Migration] Change the order of fields in the base index used for the primary Oban queries.
The new order is much faster for frequent queries such as scheduled job staging. Check the v2.11 upgrade guide for instructions on swapping the index in existing applications.
๐ท [Worker] Avoid spawning a separate task for workers that use timeouts.
๐ท [Engine] Add
insert_job
,insert_all_jobs
,retry_job
, andretry_all_jobs
as required callbacks for all engines.๐ [Oban] Raise more informative error messages for missing or malformed plugins.
Now missing plugins have a different error from invalid plugins or invalid options.
๐ [Telemetry] Normalize telemetry metadata for all engine operations:
- Include
changeset
forinsert
- Include
changesets
forinsert_all
- Include
job
forcomplete_job
,discard_job
, etc
- Include
[Repo] Include
[oban_conf: conf]
intelemetry_options
for all Repo operations.
With this change it's possible to differentiate between database calls made by Oban versus the rest of your application.
๐ Bug Fixes
- ๐ท [Telemetry] Emit
discard
rather thanerror
events when a job exhausts all retries.
Previously
discard_job
was only called for manual discards, i.e., when a job returned:discard
or{:discard, reason}
. Discarding for exhausted attempts was done withinerror_job
in error cases.๐ท [Cron] Respect the current timezone for
@reboot
jobs. Previously,@reboot
expressions were evaluated on boot without the timezone applied. In that case the expression may not match the calculated time and jobs wouldn't trigger.[Cron] Delay CRON evaluation until the next minute after initialization. Now all cron scheduling ocurrs reliably at the top of the minute.
[Drainer] Introduce
discard
accumulator for draining results. Now exhausted jobs along with manual discards count as adiscard
rather than afailure
orsuccess
.[Oban] Expand changeset wrapper within multi function.
Previously,
Oban.insert_all
could handle a list of changesets, a wrapper map with a:changesets
key, or a function. However, the function had to return a list of changesets rather than a changeset wrapper. This was unexpected and made some multi's awkward.โฑ [Testing] Preserve
attempted_at/scheduled_at
inperform_job/3
rather than overwriting them with the current time.๐ [Oban] Include
false
as a viablequeue
orplugin
option in typespecs
๐ Deprecations
- ๐ [Telemetry] Hard deprecate
Telemetry.span/3
, previously it was soft-deprecated.
Removals
- ๐ [Telemetry] Remove circuit breaker event documentation because
:circuit
events aren't emitted anymore.
๐ For changes prior to v2.11 see the v2.10 docs.
๐ [opc]: https://getoban.pro/docs/pro/changelog.html ๐ [owc]: https://getoban.pro/docs/web/changelog.html