Skip to content
Snippets Groups Projects

Testing patchs

Merged Laurent requested to merge testing_patchs into stable
Compare and
+ 147
9
Preferences
Compare changes
Files
@@ -18,7 +18,6 @@
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once('cosmogramme/php/classes/classe_notice_integration.php');
class Class_Cosmogramme_Integration_PhaseReviews extends Class_Cosmogramme_Integration_PhaseAbstract {
const MY_ID=7.5;
@@ -49,21 +48,20 @@ class Class_Cosmogramme_Integration_PhaseReviews extends Class_Cosmogramme_Integ
return $this;
}
public function _execute() {
public function _execute() {
$page = 1;
while ($records = Class_AvisNotice::findAllBy(['order' => 'id',
'limitPage' => [$page, 500]])) {
if ($this->_log && (0 == ($this->_getData('nombre') % 100)))
$this->_log->ecrire('<span class="vert"> ' . $this->_getData('nombre') . ' records updated </span>');
$this->_log->ecrire('<span class="vert"> ' . $this->_getData('nombre') . ' avis mis à jour </span>');
$this->runUpdateForRecords($records);
$this->_resetDbConnection();
$page++;
}
if ($this->_log) {
@@ -80,6 +78,8 @@ class Class_Cosmogramme_Integration_PhaseReviews extends Class_Cosmogramme_Integ
}
}
protected function runUpdateForRecords($records) {
foreach ($records as $record) {
if ($this->isTimeOut())