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.
86 righe
2.7 KiB
86 righe
2.7 KiB
<? |
|
if (!empty($elabora_coda) && ($mode == "cli")) { |
|
|
|
$enti = $pdo->go("SELECT dominio FROM b_enti WHERE attivo = 'S' AND (dominio <> '' OR dominio IS NOT NULL) AND db = 'S'")->fetchAll(PDO::FETCH_ASSOC); |
|
if (!empty($enti)) { |
|
|
|
class User { |
|
public $codice = -1; |
|
public $gerarchia = -1; |
|
public $elaborazioneCoda = true; |
|
public $authenticationLevel = 2; |
|
public $spidUser = false; |
|
public $readOnly = false; |
|
public function hasSuperPowers() : Bool { |
|
return true; |
|
} |
|
} |
|
|
|
$_SESSION["utente"]= new User; |
|
if (!defined("__CMDS_JOB_EXEC")) { |
|
define("__CMDS_JOB_EXEC", TRUE); |
|
} |
|
|
|
NuovaPiattaformaAppalti::rotateLogs(); |
|
|
|
foreach($enti as $dbEnte) { |
|
|
|
alertManager::printCliSuccess("Elaborazioni Tenant: {$dbEnte["dominio"]}"); |
|
$ente = new ente(); |
|
$ente->excludeConnector = true; |
|
if ($ente->init($dbEnte["dominio"])) { |
|
|
|
$pdo->setConnessioneEnte($ente->codice); |
|
$_SESSION["ente"] = $ente; |
|
if (! empty($ente->getInfo()["dominio"])) { |
|
|
|
$_SESSION["config"]["link_sito"] = $config["protocollo"] . $ente->getInfo()["dominio"]; |
|
|
|
} |
|
|
|
$_SESSION["config"]["nome_sito"] = $config["nome_sito"] . " - " . $ente->getInfo()["denominazione"]; |
|
|
|
} |
|
$to_include = [ |
|
__DIR__ . "/tenant/update_oidc.php", |
|
__DIR__ . "/tenant/invia_inviti_programmati.php", |
|
__DIR__ . "/tenant/alert_revisioni.php", |
|
__DIR__ . "/tenant/check_revisioni.php", |
|
__DIR__ . "/tenant/deadline_form.php", |
|
__DIR__ . "/tenant/update_hub.php", |
|
__DIR__ . "/tenant/update_guue.php", |
|
__DIR__ . "/tenant/sync_tuttoverifiche.php", |
|
__DIR__ . "/tenant/gestisci_documenti_contratti.php", |
|
__DIR__ . "/tenant/integrazioni.php", |
|
__DIR__ . "/tenant/remove_old_preservation_zip.php", |
|
__DIR__ . "/npa/conferma.php", |
|
__DIR__ . "/npa/pubblica.php", |
|
__DIR__ . "/npa/autopubblica.php", |
|
__DIR__ . "/npa/avviso.php", |
|
__DIR__ . "/npa/fvoe.php", |
|
__DIR__ . "/tenant/procureplus.php", |
|
]; |
|
foreach ($to_include as $path) { |
|
try { |
|
alertManager::printCliInfo("- Caricamento di {$path}"); |
|
require $path; |
|
} catch (\Throwable $t) { |
|
$alert = <<<ERR |
|
[!] {$path} ha lanciato un eccezione: |
|
{$t->getMessage()} |
|
{$t->getTraceAsString()} |
|
ERR; |
|
alertManager::printCliAlert($alert); |
|
ec_create_ticket("Eccezione in {$path}", $alert, $ente->codice ?? 0); |
|
} |
|
}; |
|
|
|
unset($ente); |
|
unset($_SESSION["ente"]); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
?>
|