All Versions
Latest Version
Avg Release Cycle
19 days
Latest Release
130 days ago

Changelog History
Page 1

  • v2.3.4

    December 02, 2020

    ๐Ÿ›  Fixed

    • โšก๏ธ [Oban.Worker] Update from_string/1 to correctly work with modules that weren't loaded.
  • v2.3.3

    November 10, 2020

    ๐Ÿ”„ Changed

    • ๐Ÿ‘ท [Oban.Migration] Conditionally skip altering oban_job_state if the cancelled state is already present. This allows for a smoother upgrade path for users running PG < 12. See the notes for v2.3.0 for more details.
  • v2.3.2

    November 06, 2020

    ๐Ÿ›  Fixed

    • โช [Oban.Migration] Restore indexes possibly removed by changing oban_job_state. This only applies to PG older than version 12.

    • ๐Ÿ”Œ [Oban.Plugins.Pruner] Prune cancelled jobs along with completed or discarded.

  • v2.3.1

    November 06, 2020

    ๐Ÿ”„ Changed

    • ๐Ÿ‘ท [Oban.Migration] Conditionally alter oban_job_state if the PG version is 12 or greater. This is vastly faster than the renaming, adding and dropping required for older PG versions.
  • v2.3.0

    November 06, 2020

    Migration Required (V9)

    ๐Ÿ‘ท Migration V9 brings the new cancelled state, a cancelled_at column, and job meta.

    Older versions of PostgreSQL, prior to version 12, don't allow altering an enum within a transaction. If you're running an older version and want to prevent a table rewrite you can add the new cancelled at state before running the V9 migration.

    Create a migration with @disable_ddl_transaction true declared and run the ๐Ÿ‘ท command ALTER TYPE oban_job_state ADD VALUE IF NOT EXISTS 'cancelled'. The V9 ๐Ÿ‘€ migration will see that the cancelled value exists and won't attempt to modify the enum.

    After you've sorted adding the cancelled state (or ignored the issue, because ๐Ÿ‘ท you're either running PG >= 12 or don't have many jobs retained), generate a new migration:

    mix ecto.gen.migration upgrade_oban_jobs_to_v9

    Next, call Oban.Migrations in the generated migration:

    defmodule MyApp.Repo.Migrations.UpdateObanJobsToV9 do
      use Ecto.Migration
      defdelegate up, to: Oban.Migrations
      defdelegate down, to: Oban.Migrations

    โฌ†๏ธ Oban will manage upgrading to V9 regardless of the version your application is currently using, and it will roll back a single version.

    โž• Added

    • ๐Ÿ‘ท [Oban.Job] Add new meta field for storing arbitrary job data that isn't appropriate as args.

    • ๐Ÿ‘ท [Oban.Job] Introduce a cancelled state, along with a new cancelled_at timestamp field. Cancelling a job via Oban.cancel_job (or via Oban Web) now marks the job as cancelled rather than discarded.

    • ๐Ÿ‘ท [Oban.Worker] Add from_string/1 for improved worker module resolution.

    • ๐Ÿ“‡ [Oban.Telemetry] Pass the full job schema in telemetry metadata, not only select fields. Individual fields such as args, worker, etc. are still passed for backward compatibility. However, their use is deprecated and they are no longer documented.

    ๐Ÿ›  Fixed

    • [Oban.Notifier] Fix resolution of Oban.Notifier child process in Oban.Notifier.listen/2.

    • ๐Ÿ‘ท [Oban.Queue.Producer] Fix cancelling jobs without a supervised process. In some circumstances, namely a hot code upgrade, the job's process could terminate without the producer tracking it and leave the job un-killable.

    • [Oban] Only convert invalid changesets into ChangesetError from insert!. This prevents unexpected errors when insert! is called within a transaction after the transaction has rolled back.

  • v2.2.0

    October 12, 2020

    โž• 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:

    %{some_value: 2, id: 123}
    |> 10, replace_args: true unique: [keys: [:id]])
    |> Oban.insert()

    Will result in a single job with the args:

    %{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 a discarded or retryable 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 the MON.

  • v2.1.0

    August 21, 2020

    ๐Ÿ›  Fixed

    • โœ… [Oban.Testing] Modify the behaviour checking in perform_job/3 so that it considers all behaviours.

    • ๐Ÿ”Œ [Oban.Plugins.Pruner] Use distinct names when running multiple Oban instances in the same application.

    โž• Added

    • [Oban] In addition to the standard queue-name / limit keyword syntax it is now possible to define per-queue options such as :poll_interval, :dispatch_cooldown, :paused, and even override the :producer module.

    • ๐Ÿ‘ท [Oban] Cancelling a running job now records an error on the job if it was running at the time it was cancelled.

    • ๐Ÿ‘ท [Oban.Job] Allow using :discarded as a unique state and expose all possible states through Oban.Job.states/0.

    • ๐Ÿ‘ท [Oban.Worker] Allow returning {:discard, reason} from perform/1, where the reason is recorded in the job's errors array. If no reason is provided then a default of "None" is used. All discarded jobs will have an error now, whether discarded manually or automatically.

    • ๐Ÿ‘ท [Oban.Job] Add support for uniqueness across sub-args with the :keys attribute. This makes it possible to only use a few values from a job to determine uniqueness. For example, a job that includes a lot of metadata but must be considered unique based on a :url field can specify keys: [:url].

    ๐Ÿ”„ Changed

    • ๐Ÿ‘ท [Oban.Worker] Wrap {:error, reason} and {:discard, reason} in a proper Oban.PerformError exception with a customized message. This ensures that the :error value passed to telemetry handlers is an exception and not a raw term.

    • ๐Ÿ‘ท [Oban.Worker] Wrap job timeouts in Oban.TimeoutError with a customized message indicating the worker and timeout value. This replaces the raw :timeout atom that was reported before.

    • ๐Ÿ‘ท [Oban.Worker] Wrap caught exits and throws in Oban.CrashError with a formatted message. This means the :error value passed to telemetry is always a proper exception and easier to report.

    • ๐Ÿ‘ท [Oban.Worker] Stop reporting internal stacktraces for timeouts, discards or error tuples. The stacktrace was useless and potentially misleading as it appeared that the error originated from Oban rather than the worker module.

  • v2.0.0

    July 10, 2020

    No changes from [2.0.0-rc.3][].

  • v2.0.0-rc.3

    July 01, 2020

    ๐Ÿ›  Fixed

    • ๐Ÿ‘ป [Oban.Crontab.Cron] Do not raise an ArgumentError exception when the crontab configuration includes a step of 1, which is a valid step value.

    • [Oban.Telemetry] Correctly record duration and queue_time using native time units, but log them using microseconds. Previously they used a mixture of native and microseconds, which yielded inconsistent values.

    โž• Added

    • 0๏ธโƒฃ [Oban.Telemetry] Include job queue_time in the default logger output.

    ๐Ÿ”„ Changed

    • ๐Ÿ”Œ [Oban.Plugins.Pruner] The FixedPruner is renamed to Pruner and allows users to configure the max_age value. This partially reverses the breaking change imposed by the move from prune to the FixedPruner plugin, though there isn't any support for max_len or dynamic pruning.
  • v2.0.0-rc.2

    June 23, 2020

    ๐Ÿ’ฅ Breaking Changes

    • [Oban] The interface for pause_queue/2, resume_queue/2 and scale_queue/3 now matches the recently changed start_queue/2 and stop_queue/2. All queue manipulation functions now have a consistent interface, including the ability to work in :local_only mode. See the notes around start_queue/2 and stop_queue/2 in [2.0.0-rc.1][] for help upgrading.

    • [Oban] Replace drain_queue/3 with drain_queue/2, which now has an interface consistent with the other *_queue/2 operations.

    Where you previously called drain_queue/2,3 like this:

    Oban.drain_queue(:myqueue, with_safety: false)

    You'll now it with options, like this:

    Oban.drain_queue(queue: :myqueue, with_safety: false)

    ๐Ÿ›  Fixed

    • [Oban.Breaker] Prevent connection bomb when the Notifier experiences repeated disconnections.

    • ๐Ÿ‘ท [Oban.Queue.Executor] Fix error reporting when a worker fails to resolve.

    • ๐ŸŒฒ [Oban.Telemetry] Stop logging the :error value for circuit trip events. The error is a struct that isn't JSON encodable. We include the normalized Postgrex / DBConnection message already, so the error is redundant.

    โž• Added

    • โฑ [Oban.Crontab] Add @reboot special case to crontab scheduling

    • โฑ [Oban.Telemetry] Add new :producer events for descheduling and dispatching jobs from queue producers.

    โœ‚ Removed

    • ๐Ÿšš [Oban] Removed Oban.kill_job/2, which wasn't as flexible as Oban.cancel_job/2. Use Oban.cancel_job/2 instead to safely discard scheduled jobs or killing executing jobs.