oban-bg/oban

Chain worker options ignored when passed through use

Closed this issue · 1 comments

Environment

  • Oban Version
"oban": {:hex, :oban, "2.16.2"}
"oban_pro": {:hex, :oban_pro, "1.1.4"}
"oban_web": {:hex, :oban_web, "2.9.7"}
  • PostgreSQL Version
SELECT version();

PostgreSQL 12.15 (Debian 12.15-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit`
  • Elixir & Erlang/OTP Versions (elixir --version)
elixir --version

Erlang/OTP 25 [erts-13.2] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]

Elixir 1.13.4 (compiled with Erlang/OTP 25)

Current Behavior

It seems that when we pass the on_discarded and on_cancelled options to the Chain worker as specified in the documentation with use these options are silently ignored, looks quite similar to the wait_* options bug in the changelog. Also, this same behavior could be happening with the hold_snooze option but I'm not sure.

Expected Behavior

on_discarded and on_cancelled options are applied when passed through use to the Chain worker.

Obs: Couldn't find anything related, sorry in case this is already reported or fixed.

Quite right @GiovanniHessel94. It's fixed for the next patch release, and in the meantime, you can use meta: %{on_cancelled: :ignore, on_discarded: :ignore, hold_snooze: 1} to set those options properly.