console-parallelization
console-parallelization copied to clipboard
Enables the parallelization of Symfony Console commands.
Currently commands that implement the Parallelization trait must be executed in ``bin/``. Example: ``cd ~/www/bin && bin/console pimcore:thumbnails:image --processes 1`` -> works. Example: ``cd ~www && ~/www/bin/console pimcore:thumbnails:image --processes 1``...
If ``runTolerantSingleCommand()`` would be protected, then a custom error handling can be added for child processes.
## Improvement Suggestions ### Error Handling in Child processes If in ``runSingleCommand()`` an exception is thrown, then currently the child process stops. Screenshot:  There is no out-of-the-box solution to...
As Symfony 4+ kinda deprecate injecting the whole container, wouldn't it make sense for the trait, rather than asking a `getContainer` method, ask for whatever it needs (a few parameters...
Right now, ``fetchItems()`` is only called once, which is fine. However, we also want to use the ParallelizationTrait to process queue alike structures, or at least do another run if...
On Windows systems an error occurs because PHP_EOL is not "\n" there but "\n\r". Line 109 \Webmozarts\Console\Parallelization\ProcessLauncher (instead of "\n" PHP_EOL should be used here)
Still need some works. Indeed as it is, the processes might get started/finished in an unpredictable order resulting in different outputs, meaning the current test added is way too fragile.
Bumps the dependencies group in /.github/workflows with 1 update: [ramsey/composer-install](https://github.com/ramsey/composer-install). Updates `ramsey/composer-install` from 2 to 3 Release notes Sourced from ramsey/composer-install's releases. 3.0.0 Changed Update actions/cache to v4 to avoid...
fixes issue https://github.com/webmozarts/console-parallelization/issues/223
With the current code: ```php $pwd = $_SERVER['PWD']; $scriptName = $_SERVER['SCRIPT_NAME']; return str_starts_with($scriptName, $pwd) ? $scriptName : $pwd.DIRECTORY_SEPARATOR.$scriptName; ``` If the script name is absolute, e.g. `/usr/local/bin/box`, the resolved script...