From 34b538dfc4fcddebadb41425b280b3c48edafbfb Mon Sep 17 00:00:00 2001 From: Silvio Date: Thu, 18 Nov 2010 19:14:54 -0200 Subject: Using passthru instead of pcntl to reduce memory usage --- lib/task/isisBatchTask.class.php | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/lib/task/isisBatchTask.class.php b/lib/task/isisBatchTask.class.php index 02cb526..a025691 100644 --- a/lib/task/isisBatchTask.class.php +++ b/lib/task/isisBatchTask.class.php @@ -51,23 +51,7 @@ EOF; for ($offset = 0; $offset <= $max; $offset = $offset + $rows) { - $pid = pcntl_fork(); - if ($pid == -1) - { - die('Could not fork.'); - } - else if ($pid) - { - // We are the parent. - // Protect against Zombie children. - pcntl_wait($status); - } - else - { - // We are the child. - // Mass ISIS import. - $isis->massImport($this, 'task', $rows, $offset, $database); - } + passthru("php symfony isis:import --database=$database --loglevel=". $options['loglevel'] ." $rows $offset"); } } } -- cgit v1.2.3