Préparation pour reprise automatique
This commit is contained in:
parent
315a49c7b5
commit
ce65a3718c
@ -53,19 +53,23 @@ $sql = $commandesM->select()
|
|||||||
->where("dateStart != '0000-00-00 00:00:00'")
|
->where("dateStart != '0000-00-00 00:00:00'")
|
||||||
->where("dateStop = '0000-00-00 00:00:00'");
|
->where("dateStop = '0000-00-00 00:00:00'");
|
||||||
$result = $commandesM->fetchAll($sql);
|
$result = $commandesM->fetchAll($sql);
|
||||||
if (count($result)>0){
|
if ( count($result)>0 ) {
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Si pas de traitement en cours alors on lance
|
|
||||||
$sql = $commandesM->select()
|
|
||||||
->where('idProfil != ?', 0)
|
} else {
|
||||||
->where("dateStart = '0000-00-00 00:00:00'")
|
|
||||||
->where("dateStop = '0000-00-00 00:00:00'")
|
//Si pas de traitement en cours alors on lance
|
||||||
->order('dateAdded ASC')->limit(1);
|
$sql = $commandesM->select()
|
||||||
$result = $commandesM->fetchAll($sql);
|
->where('idProfil != ?', 0)
|
||||||
if (count($result)>0) {
|
->where("dateStart = '0000-00-00 00:00:00'")
|
||||||
$info = $result->current();
|
->where("dateStop = '0000-00-00 00:00:00'")
|
||||||
echo "Lancement enrichissement $info->id\n";
|
->order('dateAdded ASC')->limit(1);
|
||||||
exec(realpath(dirname(__FILE__))."/enrichissement.php --id ".$info->id." &");
|
$result = $commandesM->fetchAll($sql);
|
||||||
|
if (count($result)>0) {
|
||||||
|
$info = $result->current();
|
||||||
|
echo "Lancement enrichissement $info->id\n";
|
||||||
|
exec(realpath(dirname(__FILE__))."/enrichissement.php --id ".$info->id." &");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user