Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
47 righe
1.8 KiB
47 righe
1.8 KiB
<?php |
|
|
|
if (!empty($elabora_coda) && (!empty($_SESSION["ente"]))) { |
|
$npa = null; |
|
$ora = date("H"); |
|
$force = in_array("--forceANAC", $argv); |
|
if ($force || ($ora > 8 && $ora < 19 && empty(getQueueLog($_SESSION["ente"]->codice, "anac_fvoe-H{$ora}")))) { |
|
writeQueueLog($_SESSION["ente"]->codice, "anac_fvoe-H{$ora}"); |
|
$fove_records = $pdo->go("SELECT * FROM b_fvoe WHERE stato <= 10"); |
|
$count = $fove_records->rowCount(); |
|
if($count > 0) { |
|
alertManager::printCliInfo("Verifica accesso a {$count} schede."); |
|
while($fvoe = $fove_records->fetch(PDO::FETCH_ASSOC)) { |
|
try { |
|
$npa = NuovaPiattaformaAppalti::init($fvoe["codice_npa"]); |
|
if (!$npa) { |
|
alertManager::printCliAlert("Impossibile inizializzare NuovaPiattaformaAppalti per la scheda {$scheda['codice']}"); |
|
continue; |
|
} |
|
$participants = $npa->getPartecipanti(false, $fvoe["codice_lotto_npa"]); |
|
if(! empty($participants)) { |
|
|
|
$participants = array_column($participants, null, 'codice'); |
|
$participant = $participants[$fvoe]["codice_partecipante"]; |
|
$npa->requestFVOEAccess($participant); |
|
$npa = null; |
|
|
|
} |
|
|
|
} catch (\Throwable $t) { |
|
$alert = <<<ERR |
|
[!] NPA::CheckAccessoFVOE ha lanciato un eccezione: |
|
{$t->getMessage()} |
|
{$t->getTraceAsString()} |
|
ERR; |
|
alertManager::printCliAlert($alert); |
|
ec_create_ticket("Eccezione in NPA::ACCESSOFVOE", $alert, $ente->codice ?? 0); |
|
} |
|
$npa = null; |
|
} |
|
} else { |
|
alertManager::printCliInfo("Nessuna fascicolo da controllare"); |
|
} |
|
} else { |
|
alertManager::printCliInfo("Salto la verifica pubblicazione ANAC per l'ora {$ora}"); |
|
} |
|
}
|
|
|