Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running batch jobs by same worker #29

Open
jonsgreen opened this issue Aug 6, 2014 · 2 comments
Open

Running batch jobs by same worker #29

jonsgreen opened this issue Aug 6, 2014 · 2 comments

Comments

@jonsgreen
Copy link

I am exploring options for breaking up a large job into a batch of smaller jobs. I know that sidekiq pro has this ability but I am wondering if this gem has the capacity to do this as well.

What I would like is for an array of values to be passed to the same worker and run in parralel. The number of workers would be determined dynamically by however number of values are passed into the array. So

Superworker.create(:MyBatchSuperworker, :user_ids) do
  batch user_ids: :user_id do
    BatchWorker :user_id
  end
end

when calling:

MyBatchSuperworker.perform_async([10, 11, 12])

would create 3 BatchWorker jobs run at the same time (not serially). Without having tried out the DSL I get the sense that the current expected behavior is for the jobs to be run serially. Is that correct?

How hard would it be to add a feature for running the batches in parallel instead of serially if it does not exist with the current DSL?

@xtagon
Copy link

xtagon commented Nov 26, 2014

👍 I have the exact same use case. This issue was opened 3 months ago, any progress?

@jonsgreen
Copy link
Author

@xtagon: we ended up getting a pro subscription so I did not pursue this further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants