sidekiq-superworker icon indicating copy to clipboard operation
sidekiq-superworker copied to clipboard

Support for dynamic number of parallel jobs?

Open joshjordan opened this issue 8 years ago • 2 comments

What if I have a workflow that looks like this?

  1. Fetch the number of objects
  2. For each object, enqueue one processing job
  3. After all objects have been processed, run one final job

Is this something that's supported? A practical example is processing all of a user's Github repos. You don't know how many there are in advance, and you want to be able to let individual jobs fail independently.

It doesn't seem like defining superworkers is the right pattern.

joshjordan avatar May 31 '16 17:05 joshjordan

@joshjordan I'm trying to do this right now. Do batches not handle this for you?

jeremyhaile avatar Jul 07 '17 11:07 jeremyhaile

Perhaps it does! Is it possible to create a job that runs only after the entire batch has completed? That's what I couldn't figure out or make happen when I tried.

joshjordan avatar Jul 07 '17 11:07 joshjordan