oban v2.2.0 Release Notes
Release Date: 2020-10-12 // over 3 years ago-
โ Added
[Oban] Replace local dynamically composed names with a registry. This dramatically simplifies locating nested children, avoids unnecessary atom creation at runtime and improves the performance of config lookups.
[Oban.Repo] The new
Oban.Repo
module wraps interactions with underlying Ecto repos. This ensures consistent prefix and log level handling, while also adding full dynamic repo support.
The
Oban.Repo
wrapper should be used when authoring plugins.๐ท [Oban.Job] Augment the unique keys option with
replace_args
, which allows enqueuing a unique job and replacing the args subsequently. For example, given a job with these args:%{some_value: 1, id: 123}
Attempting to insert a new job:
```elixir %{some_value: 2, id: 123} |> MyJob.new(schedule_in: 10, replace_args: true unique: [keys: [:id]]) |> Oban.insert() ```
Will result in a single job with the args:
```elixir %{some_value: 2, id: 123} ```
[Oban] Add
Oban.check_queue/1,2
for runtime introspection of a queue's state. It displays a compactly formatted breakdown of the queue's configuration, a list of running jobs, and static identity information.๐ท [Oban] Add
Oban.retry_job/1,2
, used to manually retry adiscarded
orretryable
job.๐ [Oban.Telemetry] Include
tags
as part of the metadata for job events.
๐ Changed
- 0๏ธโฃ [Oban.Worker] The default backoff algorithm now includes a small amount of jitter. The jitter helps prevent jobs that fail simultaneously from repeatedly retrying together.
๐ Fixed
0๏ธโฃ [Oban.Job] Don't include
discarded
state by default when accounting for uniqueness.๐ [Oban.Cron] Fully support weekeday ranges in crontab expressions. Previously, given a weekday range like
MON-WED
the parser would only retain theMON
.