Mukulch15

Mukulch15

Parallel job processing in Oban

I have created a queue in Oban with a concurrency of 12. The worker’s job is to take the parameters, make an http call and insert the response into database. However when I inserted jobs using Oban.insert_all, I see that the jobs are getting processed serially and not in parallel. Am I missing any config ? Or is it something provided in Oban pro.

Marked As Solved

sorentwo

sorentwo

Oban Core Team

Ah. This is because you’re running with inline test mode. That should only be enabled in test.exs, not for your base config.

The way you have it configured you’re never persisting anything into the database, it’s executing them one at a time in memory.

Also Liked

Mukulch15

Mukulch15

Thank you so much. It’s working now. It’s been more than a day. :sweat_smile:

outlog

outlog

is the http library running a queue of 1?

else show some pseudo code, and/or debug by removing http call and do something like this in the worker:

IO.inspect("job started")
:timer.sleep(5_000)
IO.inspect("job done")

and see if they are parallel..

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

If you have 12 workers, they should all try to process a job, which means you should see 12 jobs in progress at once (parallel).

Can you tell us how you are sure they’re happening serially?

Last Post!

Mukulch15

Mukulch15

Thank you so much. It’s working now. It’s been more than a day. :sweat_smile:

Where Next?

Popular in Questions Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New

Other popular topics Top

hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54996 245
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42576 114
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

We're in Beta

About us Mission Statement