Skip to content
Snippets Groups Projects
Commit 139d5e2d authored by Ghislain Loas's avatar Ghislain Loas
Browse files

be quiet

parent 55614782
Branches
Tags
1 merge request!4561be quiet
Pipeline #18806 passed with stage
in 23 minutes and 55 seconds
...@@ -22,6 +22,10 @@ ...@@ -22,6 +22,10 @@
class Class_Migration_RecordSelectionWithInternalData { class Class_Migration_RecordSelectionWithInternalData {
use
Trait_EchoError,
Trait_Translator;
protected Zend_Db_Adapter_Abstract $_sql; protected Zend_Db_Adapter_Abstract $_sql;
protected array $_sources; protected array $_sources;
protected Class_Cosmogramme_Chronometre $_chrono; protected Class_Cosmogramme_Chronometre $_chrono;
...@@ -57,17 +61,22 @@ class Class_Migration_RecordSelectionWithInternalData { ...@@ -57,17 +61,22 @@ class Class_Migration_RecordSelectionWithInternalData {
$this->_cache = []; $this->_cache = [];
$this->_chrono->start(); $this->_chrono->start();
$this->setEchoFunction(fn($message) => null);
$this->echoStartTitle($this->_('Mise à jour des sélections de documents'));
foreach ($this->_sql->fetchAll('select id, notices from notices_paniers') as $row) foreach ($this->_sql->fetchAll('select id, notices from notices_paniers') as $row)
$this->_runOne($row); $this->_runOne($row);
printf("UPGRADE on %d selection(s)\n", $this->_selections_count); $this->echoError($this->_("UPGRADE on %d selection(s)", $this->_selections_count) . "\n");
printf("Checked %d key(s)\n", $this->_keys_count); $this->echoError($this->_("Checked %d key(s)", $this->_keys_count) . "\n");
printf("Upgraded %d key(s)\n", $this->_upgraded_count); $this->echoError($this->_("Upgraded %d key(s)", $this->_upgraded_count) . "\n");
printf("Nothing to do on %d key(s)\n", $this->_nothing_todo_count); $this->echoError($this->_("Nothing to do on %d key(s)", $this->_nothing_todo_count) . "\n");
printf("Not upgradable %d key(s)\n", $this->_not_upgradable_count); $this->echoError($this->_("Not upgradable %d key(s)", $this->_not_upgradable_count) . "\n");
printf("%d cache hit(s)\n", $this->_cache_hits); $this->echoError($this->_("%d cache hit(s)", $this->_cache_hits) . "\n");
echo $this->_chrono->end() . "\n\n"; $this->echoEndTitle($this->_chrono->end());
return $this; return $this;
} }
...@@ -127,12 +136,12 @@ class Class_Migration_RecordSelectionWithInternalData { ...@@ -127,12 +136,12 @@ class Class_Migration_RecordSelectionWithInternalData {
foreach ($this->_sql->fetchAll('select id, notices from notices_paniers') as $row) foreach ($this->_sql->fetchAll('select id, notices from notices_paniers') as $row)
$this->_downOne($row); $this->_downOne($row);
printf("DOWNGRADE on %d selection(s)\n", $this->_selections_count); $this->echoError($this->_("DOWNGRADE on %d selection(s)", $this->_selections_count));
printf("Checked %d key(s)\n", $this->_keys_count); $this->echoError($this->_("Checked %d key(s)", $this->_keys_count));
printf("Downgraded %d key(s)\n", $this->_upgraded_count); $this->echoError($this->_("Downgraded %d key(s)", $this->_upgraded_count));
printf("Nothing to do on %d key(s)\n", $this->_nothing_todo_count); $this->echoError($this->_("Nothing to do on %d key(s)", $this->_nothing_todo_count));
echo $this->_chrono->end() . "\n\n"; $this->echoError($this->_chrono->end());
return $this; return $this;
} }
......
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