Skip to content

Commit

Permalink
EZP-29505: ezxmltext -> richtext conversion: memory_limit per child p…
Browse files Browse the repository at this point in the history
…rocess (ezsystems#65)
  • Loading branch information
vidarl committed Aug 20, 2018
1 parent 90eda29 commit 1b7dd49
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bundle/Command/ConvertXmlTextToRichTextCommand.php
Expand Up @@ -472,6 +472,13 @@ private function createChildProcess($dryRun, $checkDuplicateIds, $checkIdValues,
'--image-content-types=' . implode(',', $this->imageContentTypeIdentifiers),
"--user=$this->userLogin",
];

$memoryLimit = ini_get('memory_limit');
if ($memoryLimit !== null) {
array_unshift($arguments, "memory_limit=$memoryLimit");
array_unshift($arguments, '-d');
}

if ($dryRun) {
$arguments[] = '--dry-run';
}
Expand Down

0 comments on commit 1b7dd49

Please sign in to comment.