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

hotline #17959_no_more_batch_in_web_integrtion

parent d079055b
Branches
Tags
6 merge requests!545Master,!544Master,!543Master,!542Master,!540Hotline 6.56,!536Hotline #17959 no more batch in web integrtion
- ticket: 17959:
- Intégration Cosmogramme depuis l'interface WEB
- Les batchs ajoutés par l'OPAC ne se lance plus via l'intégration cosmogramme en mode "web"
- Les batchs se lancent uniquement via l'interface admin/batch ou lors d'une intégration de mode "cron"
\ No newline at end of file
......@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with AFI-OPAC 2.0; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// ----------------------------------------------------------------
// PSEUDO-NOTICES - cms rss sitotheque et albums (phase 0.1 a 0.6)
......@@ -40,21 +40,19 @@ if ($phase > 0 and $phase < 0.2) {
if ($phase == 0.11) {
$batchs = Class_Batch::findAllBy(['order' => 'id']);
foreach ($batchs as $batch) {
if ($phase_data["pointeur_reprise"] > $batch->getId())
continue;
$log->ecrire('<span class="vert">'.$batch->getLibelle().':');
$phase_data["pointeur_reprise"]=$batch->getId();
if ('MOISSONNAGE_CYBERLIBRIS' != $batch->getType() || $mode_cron) {
$batch->run();
} else {
$log->ecrire('Ce batch n\'est traité qu\'en mode cron');
if($mode_cron) {
$batchs = Class_Batch::findAllBy(['order' => 'id']);
foreach ($batchs as $batch) {
if ($phase_data["pointeur_reprise"] > $batch->getId())
continue;
$log->ecrire('<span class="vert">'.$batch->getLibelle().':');
$phase_data["pointeur_reprise"]=$batch->getId();
$log->ecrire(' OK</span><br/>');
$log->ecrire('<span class="vert">Temps de traitement : ' . $chrono->end() .'</span>');
}
$log->ecrire(' OK</span><br/>');
$log->ecrire('<span class="vert">Temps de traitement : ' . $chrono->end() .'</span>');
} else {
$log->ecrire('Les batchs sont traités qu\'en mode cron'.);
}
$phase = 0.2;
}
}
......@@ -269,9 +267,9 @@ if ($phase < 0.7)
if ($phase == 0.7)
{
if ($phase_data["nombre"] and !$mode_cron)
if ($phase_data["nombre"] and !$mode_cron)
print('<span class="violet">Notices RESSOURCES NUMERIQUES : ajouts</span>' . BR);
if (!$mode_cron and $chrono->tempsPasse() > 10)
if (!$mode_cron and $chrono->tempsPasse() > 10)
sauveContexte();
$chrono->start();
$result = $sql->prepareListe("select * from album where id >" . $phase_data["pointeur_reprise"] . " and visible=true order by id");
......
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