From 978b0ed546aebbe04cbe364dd050eaec18da5512 Mon Sep 17 00:00:00 2001 From: Silvio Date: Thu, 18 Nov 2010 16:18:12 -0200 Subject: Enhancing isis:batch --- lib/task/isisBatchTask.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/task/isisBatchTask.class.php') diff --git a/lib/task/isisBatchTask.class.php b/lib/task/isisBatchTask.class.php index 95be44c..02cb526 100644 --- a/lib/task/isisBatchTask.class.php +++ b/lib/task/isisBatchTask.class.php @@ -27,7 +27,7 @@ EOF; protected function execute($arguments = array(), $options = array()) { - // initialize the database connection + // Initialize the database connection. $databaseManager = new sfDatabaseManager($this->configuration); $connection = $databaseManager->getDatabase($options['connection'])->getConnection(); @@ -46,15 +46,15 @@ EOF; foreach ($databases as $database) { - $rows = (isset($arguments['rows'])) ? $argument['rows'] : 20; - $max = 1000; // TODO + $rows = (isset($arguments['rows'])) ? $argument['rows'] : 100; + $max = $isis->info($this, 'task', $database); for ($offset = 0; $offset <= $max; $offset = $offset + $rows) { $pid = pcntl_fork(); if ($pid == -1) { - die('Could not fork'); + die('Could not fork.'); } else if ($pid) { -- cgit v1.2.3