-
Notifications
You must be signed in to change notification settings - Fork 203
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
EZP-29504 : add siteaccess parameter to ezplatform:reindex #2418
Conversation
Add siteaccess parameter when ezplatform:reindex is run in multi-process
This comment has been minimized.
This comment has been minimized.
@emodric has reported a regression on this: https://jira.ez.no/browse/EZP-29640 I'm guessing he hits a case where @jlchassaing Are you up for improving this a bit to avoid passing this if not set? |
@andrerom Yep, when adding an explicit siteaccess argument, then it works fine. |
@emodric Would something like this work for you: diff --git a/eZ/Bundle/EzPublishCoreBundle/Command/ReindexCommand.php b/eZ/Bundle/EzPublishCoreBundle/Command/ReindexCommand.php
index 807cdf9725..e6104be304 100644
--- a/eZ/Bundle/EzPublishCoreBundle/Command/ReindexCommand.php
+++ b/eZ/Bundle/EzPublishCoreBundle/Command/ReindexCommand.php
@@ -375,12 +375,12 @@ EOT
*/
private function getPhpProcess(array $contentIds, $commit)
{
- $process = new ProcessBuilder([
+ $process = new ProcessBuilder(array_filter([
file_exists('bin/console') ? 'bin/console' : 'app/console',
$this->siteaccess ? '--siteaccess=' . $this->siteaccess : null,
'ezplatform:reindex',
'--content-ids=' . implode(',', $contentIds),
- ]);
+ ]));
$process->setTimeout(null);
$process->setPrefix($this->getPhpPath());
|
@andrerom It should work, yes. |
6.x
Add siteaccess parameter when ezplatform:reindex is run in multi-process on a multi-siteaccess multi-repository environment
TODO:
$ composer fix-cs
).