paraunit icon indicating copy to clipboard operation
paraunit copied to clipboard

Configurable chunker

Open malarzm opened this issue 2 years ago • 1 comments

This PR build on #164 (hence many commits) and implements my comment https://github.com/facile-it/paraunit/pull/164#discussion_r873876877 (the last commit). During development I've realized what really " it would also be hard to find an easy extension point to attach to..." meant :) I decided to just abstract away the array_chunk from Runner and make it technically possible to change the implementation (not to say it's easy or anything).

Sidenote: turned out that in our project we're already doing some funky stuff to have a custom printer, that involves overriding some of Paraunit's classes to finally hook into what \Paraunit\Configuration\DependencyInjection\ParallelContainerDefinition is doing. With this inelegant hack I was able to wire my own chunker though :)

Is such approach OK for you? Maybe you have a vision on how to interfere with Paraunit's DI container in a cleaner way? Anyway let me know, maybe I'll be able to help with something.

malarzm avatar May 18 '22 16:05 malarzm

Is such approach OK for you? Maybe you have a vision on how to interfere with Paraunit's DI container in a cleaner way? Anyway let me know, maybe I'll be able to help with something.

That's the hard part I was talking about. The DI of Paraunit is nowhere accessible from your app: you have to find an input point in the configuration or the CLI options somewhere, so I can't think of an easy way in...

Jean85 avatar May 19 '22 07:05 Jean85