mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 01:04:09 +02:00
parent
0e0341f78a
commit
9af25acf38
@ -5,6 +5,7 @@ namespace Icinga\Repository;
|
|||||||
|
|
||||||
use Iterator;
|
use Iterator;
|
||||||
use IteratorAggregate;
|
use IteratorAggregate;
|
||||||
|
use Icinga\Application\Benchmark;
|
||||||
use Icinga\Application\Logger;
|
use Icinga\Application\Logger;
|
||||||
use Icinga\Data\QueryInterface;
|
use Icinga\Data\QueryInterface;
|
||||||
use Icinga\Data\Filter\Filter;
|
use Icinga\Data\Filter\Filter;
|
||||||
@ -532,6 +533,7 @@ class RepositoryQuery implements QueryInterface, Iterator
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->iterator->rewind();
|
$this->iterator->rewind();
|
||||||
|
Benchmark::measure('Query result iteration started');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -562,7 +564,12 @@ class RepositoryQuery implements QueryInterface, Iterator
|
|||||||
*/
|
*/
|
||||||
public function valid()
|
public function valid()
|
||||||
{
|
{
|
||||||
return $this->iterator->valid();
|
if (! $this->iterator->valid()) {
|
||||||
|
Benchmark::measure('Query result iteration finished');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user