Closed hnatt closed 10 years ago
+1
Thanks for looking into this. I've ended up implementing a slightly different solution that's a little more generalized in c04200a4.
The README example in your PR was:
MyBatchSuperworkerWithArgs.perform_async([30, 31, 32, 33], 'Hello', 'world')
With the new setup, this would be written like so:
MyBatchSuperworkerWithArgs.perform_async([30, 31, 32, 33], Array.new(4, 'Hello'), Array.new(4, 'world'))
The upside is that this supports more use cases (see the updated README for details).
While not completely undestanding, how the DSL and particularly, passing args to batch workers, work, with this patch I made it possible to pass the arguments received by superworker class on to batch subworkers. Spec test and documentation included.