I’m trying to understand how to use Oban Pro Chunk workers. I have a SendWorker that gets inserted thousands at a time. The SendWorkers get inserted with an “id” arg. I want to use Chunk workers so that I can use Chunk Partitioning and Queue Partitioning.
I have converted the SendWorker to a chunk worker, but when I insert multiple of these new SendWorkers, they still run independently of each other. Below is the sample code, but the log always displays the following no matter how many workers I insert.
SendWorker Chunk Starting with 1 Oban jobs
use Oban.Pro.Workers.Chunk,
queue: :messaging,
size: 1000,
timeout: 5000
@impl true
def process([_ | _] = oban_jobs) do
Logger.debug(["SendWorker Chunk Starting with #{length(oban_jobs)} Oban jobs"])
...
end
I’m sure I’m misunderstanding something or doing something wrong, can someone please help me understand how this should work?