Skip to content
Snippets Groups Projects
Commit a2c9c782 authored by Matthias Meusburger's avatar Matthias Meusburger
Browse files

rel #23391: increase max number of items for a record

parent 8c9e9959
Branches
Tags
3 merge requests!896Master,!827Stable,!820Hotline #23391 remove while true
......@@ -23,6 +23,7 @@
class Class_Cosmogramme_Integration_PhaseItemFacets
extends Class_Cosmogramme_Integration_PhaseAbstract {
const MY_ID = 7;
const MAX_ITEMS = 1000;
protected $_previous_records, $_last_update_date;
protected $_db_reset = true;
......@@ -81,20 +82,16 @@ class Class_Cosmogramme_Integration_PhaseItemFacets
protected function runUpdateForRecords($records) {
foreach ($records as $record) {
$nb_items = count(Class_Exemplaire::findAllBy(['id_notice' => $record->getId(),
'limit' => 26]));
foreach ($records as $record) {
if ($this->isTimeOut())
return $this->_resetDbConnection()
->_phase;
if($nb_items > 25)
return;
if ($this->isTimeOut())
return $this->_resetDbConnection()
->_phase;
$this->_runOne($record);
}
if (static::MAX_ITEMS < Class_Exemplaire::countBy(['id_notice' => $record->getId()]))
return;
$this->_runOne($record);
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment