Skip to content

Commit

Permalink
Made some changes according to @SharkyKZ 's notes
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmayer committed Jul 20, 2019
1 parent 8d758d4 commit fd107eb
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions cli/finder_indexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,21 +158,21 @@ public function doExecute()
$_SERVER['HTTP_HOST'] = 'domain.com';
JFactory::getApplication('site');

$this->minimumBatchProcessingTime = $this->input->getInt('minproctime', 1, 'raw');
$this->minimumBatchProcessingTime = $this->input->getInt('minproctime', 1);

// Pause between batches to let the server catch a breath. The default, if not set by the user, is 5 seconds.
if (($pauseArg = $this->input->get('pause', 'division', 'raw')) !== false)
$pauseArg = $this->input->get('pause', 'division', 'raw');

if ($pauseArg === 'division')
{
if ($pauseArg === 'division')
{
$this->pause = 'division';
$this->divisor = $this->input->get('divisor', 5, 'raw');
}
else
{
$this->pause = (int) $pauseArg;
}
$this->pause = 'division';
$this->divisor = $this->input->getInt('divisor', 5);
}
else
{
$this->pause = (int) $pauseArg;
}


// Purge before indexing if --purge on the command line.
if ($this->input->getString('purge', false))
Expand Down Expand Up @@ -284,7 +284,7 @@ private function index()
$pause = 1;
}
}
elseif (is_int($this->pause) && $this->pause > 0)
elseif ($this->pause > 0)
{
$pause = $this->pause;
}
Expand Down

0 comments on commit fd107eb

Please sign in to comment.