Enhancements
-
[Worker] Allow snoozing jobs by returning a tuple period
It's now possible to snooze jobs with a period such as
{1, :minute}instead of just a raw number of seconds. -
[Oban] Validate no duplicate options are passed to config on init
Because options are provided as a keyword list, duplicate options were accepted while only one was actually used.
Bug Fixes
-
[Oban] Fix starting a queue on a specific node
The
:nodeoption was incorrectly preserved when starting a queue, which would crash it. Now the:nodeis dropped after scoping the start signal. -
[Reindexer] Fix dropping invalid indexes from the reindexer
The reindexer would fail sliently with "DROP INDEX CONCURRENTLY" cannot be executed from a function message because the deindex operation used a
DOblock to loop through and drop invalid indexes, but PostgreSQL prohibitsCONCURRENTLYoperations inside functions or DO blocks. Now invalid indexes are fetched first, then dropped as individual queries. -
[Installer] Prevent installer crash with unsupported adapters
The installer would crash with a
CaseClauseErrorwhen a project had an Ecto repo using an unsupported adapter likeEcto.Adapters.Tds.Now the installer filters repos to find one with a supported adapter, skipping unsupported ones automatically. Without a compatible repo, it displays an error message listing the found repos and their adapters, along with guidance on how to specify a repo explicitly.
-
[Pruner] Better sqlite timestamp default and pruning query
The
CURRENT_TIMESTAMPtype lacks a trailingz, which causes it to be compared incorrectly against UTC datetimes. Any jobs inserted without ascheduled_at, where the default is used, could be returned in queries that compare against aDateTime.This prevents the issue in the future two ways:
- Switch the default
inserted_at/scheduled_attimestamp to a format that can be queried properly. - Change the pruning check to use
completed_atrather thanscheduled_atfor existing databases. This is a more accurate query that was avoided before because it didn't match theBasicengine.
- Switch the default