Oban.resume_all_queues/_ issues
Closed this issue · 1 comments
nietaki commented
I went with a single ticket - it seemed to make more sense than to break it into two
Environment
- Oban Version:
2.17.1
(using pro and web) - PostgreSQL Version:
15.3
- Elixir & Erlang/OTP Versions (
elixir --version
):
Erlang/OTP 26 [erts-14.1.1] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]
Elixir 1.15.7 (compiled with Erlang/OTP 26)
Current Behavior
Running Oban.resume_all_queues(local_only: true)
fails in 2 different ways:
First is [local_only: true]
is passed as the first optional argument (name
), resulting in the following (app name obfuscated):
** (Mix) Could not start application my_app: exited in: MyApp.Application.start(:normal, [])
** (EXIT) an exception was raised:
** (RuntimeError) No Oban instance named `[local_only: true]` is running and config isn't available.
(oban 2.17.1) lib/oban/registry.ex:37: Oban.Registry.config/1
(oban 2.17.1) lib/oban.ex:944: Oban.resume_queue/2
(my_app 0.1.0) lib/my_app/application.ex:74: MyApp.Application.start/2
(kernel 9.1) application_master.erl:293: :application_master.start_it_old/4
Second is [local_only: true]
only seems to work with Oban.resume_queue/_
. When an explicit name
is provided to resume_all_queues
, it errors out as follows:
** (Mix) Could not start application my_app: exited in: MyApp.Application.start(:normal, [])
** (EXIT) an exception was raised:
** (ArgumentError) queue :* does not exist locally
(oban 2.17.1) lib/oban.ex:1329: Oban.validate_queue_exists!/2
(oban 2.17.1) lib/oban.ex:942: Oban.resume_queue/2
(my_app 0.1.0) lib/my_app/application.ex:74: MyApp.Application.start/2
(kernel 9.1) application_master.erl:293: :application_master.start_it_old/4
Expected Behavior
It would work equivalently to running Oban.resume_queue/_
on each of the queues with local_only: true
. We reverted back to this approach.
sorentwo commented
Thanks for the report. Fixed!