/** * Run the analysis * @param bool $runAnalysis If it's set to false the analysis won't be started. If $fastOnly is true and $runAnalysis * if false only the fast analyzer are executed. The pending_analysis flag is set to true * @param bool $fastOnly If it set to true the slow analyzer are not started */ public static function run($runAnalysis = true, $fastOnly = false) { Controller::init(); Logger::log("Controller avviato"); $count = Controller::updateCache(); Logger::log($count, "nuovi eventi nei log"); if ($runAnalysis) { if ($count > 0 || Config::get("debug") || Utils::getMiscResult("pending_analysis") == "yes") { Controller::runAnalysis($fastOnly); } else { Logger::log("Nessuna azione eseguita"); } } else { if ($count > 0 || Config::get("debug")) { Utils::saveMiscResult("pending_analysis", "yes"); if ($fastOnly) { Logger::log("Running fast-only analysis even if \$runAnalysis is false"); Controller::runAnalysis($fastOnly); } else { Logger::log("Analysis skipped..."); } } else { Logger::log("Nessuna azione eseguita"); } } }