Mukulch15

Mukulch15

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.

Showing Posts 1 to 5

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?

Mukulch15

Mukulch15 OP

@outlog @benwilson512 So I tried to simulate using the above snippet as well.

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

The output is serial. After every 5 seconds, Job Done gets printed. If it were parallel, I should have seen at least 12 get printed together.

My config:

config :App, Oban,
  repo:App.Repo,
  plugins: [Oban.Plugins.Pruner],
  queues: [test: 12],
  testing: :inline

Code:

def perform(params) do
    IO.inspect("job started")
    :timer.sleep(5_000)
    IO.inspect("job done")
end
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.

Mukulch15

Mukulch15 OP

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

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
jaybe78
Hello, I’m developing a online persistent chat system (what’s app) like using elixir/dynamodb/aws for a mobile app(flutter). The diffic...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews