skip existing runs
This commit is contained in:
parent
bd49027ad6
commit
807aa70719
@ -174,6 +174,11 @@ function getResults($run,$event)
|
|||||||
$url = "https://www.dognow.at/ergebnisse/pdf.php?lauf=$run&event=$event";
|
$url = "https://www.dognow.at/ergebnisse/pdf.php?lauf=$run&event=$event";
|
||||||
if(!file_exists('tmp/results/' . $event . '-' . $run . '.pdf'))
|
if(!file_exists('tmp/results/' . $event . '-' . $run . '.pdf'))
|
||||||
file_put_contents('tmp/results/' . $event . '-' . $run . '.pdf',file_get_contents($url));
|
file_put_contents('tmp/results/' . $event . '-' . $run . '.pdf',file_get_contents($url));
|
||||||
|
if($GLOBALS['db']->query("SELECT * FROM runs WHERE id = '$run' AND event = '$event'")->fetchArray() != false)
|
||||||
|
{
|
||||||
|
echo " [i] Skipping run $run in event $event\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
convertPDFtoCSV('tmp/results/' . $event . '-' . $run . '.pdf','tmp/csv/' . $event . '-' . $run . '.pdf.csv');
|
convertPDFtoCSV('tmp/results/' . $event . '-' . $run . '.pdf','tmp/csv/' . $event . '-' . $run . '.pdf.csv');
|
||||||
analyzeResultCSV('tmp/csv/' . $event . '-' . $run . '.pdf.csv',$run,$event);
|
analyzeResultCSV('tmp/csv/' . $event . '-' . $run . '.pdf.csv',$run,$event);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user