Forward php cli options to the archiver commands #9500
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
refs #9258
See also #9498 which fixes another part of that issue
One can now specify eg
./console core:archive --php-cli-options="-d memory_limit=8G"
and these options will be forwarded to the PHP cli command. Eg this might result in/home/vagrant/.phpbrew/php/php-5.5.28/bin/php -q -d memory_limit=8G /home/vagrant/www/piwik/console climulti:request --piwik-domain='' --superuser 'module=API&method=API.get&idSite=1...
In this case
-q
is set by PHP binary finder and not related to the given options.Be aware that if
API.get
did trigger another CliMulti request these options would be not forward again (basically recursive). I'm not sure ifAPI.get
does trigger another CliMulti request somehow but I don't think so.Initially I wanted to detect PHP Cli configuration options automatically when console is called like this
php -d memory_limit=8G console core:archive ...
but I did not find a way to get these passed options.