Skip to content
Snippets Groups Projects
Commit 7a472860 authored by Eric Pommateau's avatar Eric Pommateau
Browse files

Optimisation script grand ménage

parent cf8b8195
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ et adhère aux principes du [Semantic Versioning](http://semver.org/).
### Corrections
- suppression de la memory_limit sur jour.php
- optimisation script grand-ménage
## [3.0.0-rc4] - 2017-11-24
......
......@@ -29,11 +29,12 @@ $submission_date = date("Y-m-d",strtotime("-$nb_days days"));
$sql = "SELECT id,sha1,filename,submission_date FROM helios_transactions WHERE is_in_cloud=TRUE AND submission_date<? ORDER BY id ASC";
$all_pes = $sqlQuery->query($sql,$submission_date);
$sqlQuery->prepareAndExecute($sql,$submission_date);
echo "Il y a ".count($all_pes)." PES ALLER analyser\n";
echo "Il y a un certain nombre de PES ALLER analyser\n";
$sigtermHandler = new SigTermHandler();
foreach($all_pes as $pes) {
while($sqlQuery->hasMoreResult()){
$pes = $sqlQuery->fetch();
echo "Analyse du fichier {$pes['sha1']} - {$pes['id']} - {$pes['submission_date']}\n";
$filename = HELIOS_FILES_UPLOAD_ROOT."/{$pes['sha1']}";
if (! file_exists($filename)){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment