View Source Upgrading to v2.14
This Oban release includes a number of configuration changes and deprecations for redundant functionality.
bump-your-deps
Bump Your Deps
Update Oban (and optionally Pro) to the latest versions:
[
{:oban, "~> 2.14"},
{:oban_pro, "~> 0.13", repo: "oban"}
]
remove-repeater-and-stager-plugins
Remove Repeater and Stager Plugins
The Repeater
plugin is no longer necessary as the new Stager
falls back to polling mode
automatically. Remove the Repeater
from your plugins:
plugins: [
Oban.Plugins.Lifeline,
Oban.Plugins.Pruner,
- Oban.Plugins.Repeater
The Stager
is no longer a plugin because it's essential for queue operation. If you've
overridden the staging interval:
- Reconsider whether that's necessary, staging is optimized to be a light-weight operation.
- If you're set on using a different interval, move it to
:stage_interval
plugins: [
Oban.Plugins.Lifeline,
Oban.Plugins.Pruner,
- {Oban.Plugins.Stager, interval: 5_000}
],
+ stage_interval: 5_000
ensure-configuration-for-testing
Ensure Configuration for Testing
Now that Stager
isn't a plugin, it isn't disabled by plugins: false
. Be sure
to use the :testing
option introduced in v2.12 to automate configuration:
# test.exs
- config :my_app, Oban, queues: false, plugins: false
+ config :my_app, Oban, testing: :manual
Without this change you may see a flurry of DBConnection.OwnershipError
errors
during test runs.