oban v0.3.0 Release Notes

Release Date: 2019-05-29 // almost 5 years ago
  • Migration Required (V2)

    ➕ Added

    • [Oban] Allow setting queues: false or queues: nil to disable queue dispatching altogether. This makes it possible to override the default configuration within each environment, i.e. when testing.

    The docs have been updated to promote this mechanism, as well as noting that pruning must be disabled for testing.

    • ✅ [Oban.Testing] The new testing module provides a set of helpers to make asserting and refuting enqueued jobs within tests much easier.

    🔄 Changed

    • [Oban.Migrations] Explicitly set id as a bigserial to avoid mistakenly generating a uuid primary key.

    • [Oban.Migrations] Use versioned migrations that are immutable. As database changes are required a new migration module is defined, but the interface of Oban.Migrations.up/0 and Oban.Migrations.down/0 will be maintained.

    From here on all releases with database changes will indicate that a new migration is necessary in this CHANGELOG.

    • [Oban.Query] Replace use of (bigint) with (int, int) for advisory locks. The first int acts as a namespace and is derived from the unique oid value for the oban_jobs table. The oid is unique within a database and even changes on repeat table definitions.

    This change aims to prevent lock collision with application level advisory lock usage and other libraries. Now there is a 1 in 2,147,483,647 chance of colliding with other locks.

    • 🚚 [Oban.Job] Automatically remove leading "Elixir." namespace from stringified worker name. The prefix complicates full text searching and reduces the score for trigram matches.