Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward php cli options to the archiver commands #9500

Merged
merged 1 commit into from Jan 19, 2016
Merged

Forward php cli options to the archiver commands #9500

merged 1 commit into from Jan 19, 2016

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Jan 11, 2016

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 if API.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.

@tsteur tsteur added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Jan 11, 2016
@tsteur tsteur added this to the 2.16.0 milestone Jan 11, 2016
@sgiehl
Copy link
Member

sgiehl commented Jan 19, 2016

Had a look at the code and did a very basic testing. Seems to work as expected. :shipit:

tsteur added a commit that referenced this pull request Jan 19, 2016
Forward php cli options to the archiver commands
@tsteur tsteur merged commit 45669b2 into master Jan 19, 2016
@tsteur tsteur deleted the 9258_2 branch January 19, 2016 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants