Skip to content

Commit ce28592

Browse files
committed
Release v2.19.2
1 parent 1676436 commit ce28592

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed

CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,55 @@ is extremely rare) then it warns about a missing module.
107107
This approach was chosen over a config option for backward compatibility because Oban will only
108108
support the JSON module once the minimum supported Elixir version is v1.18.
109109

110+
## v2.19.2 — 2025-02-18
111+
112+
### Bug Fixes
113+
114+
- [Peer] Correct leadership elections for the `Dolphin` engine
115+
116+
MySQL always returns the number of entries attempted, even when nothing was added. The previous
117+
match caused all nodes to believe they were the leader. This uses a secondary query within the
118+
same transaction to detect if the current instance is the leader.
119+
120+
- [Reindexer] Drop invalid indexes concurrently when reindexing.
121+
122+
The `DROP INDEX` query would lock the whole table with an `ACCESS EXCLUSIVE` lock and could
123+
cause queries to fail unexpectedly.
124+
125+
- [Testing] Use `Ecto.Type.cast/2` for backward compatibility
126+
127+
The `cast!/2` function wasn't added until Ecto 3.12. This reverts time casting to use `cast/2`
128+
for compatibility with earlier Ecto versions.
129+
130+
- [Worker] Validate that the `unique` option isn't an empty list.
131+
132+
An empty list was accepted at compile time, but wouldn't be valid later at runtime. Now the two
133+
validations match for greater parity.
134+
135+
### Enhancements
136+
137+
- [Oban] Allow setting a MFA in `:get_dynamic_repo`
138+
139+
Anonymous functions don't work with OTP releases, as anonymous functions cannot be used in
140+
configuration. Now a MFA tuple can be passed instead of a fun, and the scaling guide recommends
141+
a function instead.
142+
143+
- [Cron] Include configured timezone in cron job metadata
144+
145+
Along with the cron expression, stored as `cron_expr`, the configured timezone is also recorded
146+
as `cron_tz` in cron job metadata.
147+
148+
- [Cron] Add `next_at/2` and `last_at/2` for cron time calculations
149+
150+
This implements jumping functions for cron expressions. Rather than naively iterating through
151+
minutes, it uses the expression values to efficiently jump to the next or last cron run time.
152+
153+
- [Executor] Always convert `queue_time` to native time unit
154+
155+
The telemetry docs state that measurements are recorded in `native` time units. However, that
156+
hasn't been the case for `queue_time` for a while now. It usually worked anyway native and
157+
nanosecond is of the same resolution, but now it is guaranteed.
158+
110159
## v2.19.1 — 2025-01-27
111160

112161
### Bug Fixes

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ defmodule Oban.MixProject do
22
use Mix.Project
33

44
@source_url "https://github.com/oban-bg/oban"
5-
@version "2.19.1"
5+
@version "2.19.2"
66

77
def project do
88
[

0 commit comments

Comments
 (0)