diff --git a/htdocs/batch_process.php b/htdocs/batch_process.php index 3c7a069..7e6b39c 100644 --- a/htdocs/batch_process.php +++ b/htdocs/batch_process.php @@ -4,6 +4,8 @@ define("NO_SESSION", 1); define("SITE_ROOT", realpath(dirname(__file__))); require_once SITE_ROOT . "/lib/init.php"; +$blacklist = array("1.8.3.5282"); + set_time_limit(0); if (PHP_SAPI != "cli") @@ -38,13 +40,19 @@ foreach($reports as $id) $miniDump = $r["Minidump"]; if (!$miniDump || !($miniDump->getData())) { - ReportParser::setProcessed($id, 1); + ReportParser::deleteRaw($id); continue; } if (!($version = $r["clientVersion"])|| !($chan = $r["clientChannel"])) { - ReportParser::setProcessed($id, 1); + ReportParser::deleteRaw($id); + continue; + } + + if (in_array($version, $blacklist)) + { + ReportParser::deleteRaw($id); continue; } diff --git a/htdocs/lib/ReportParser.php b/htdocs/lib/ReportParser.php index 5804157..f52f879 100644 --- a/htdocs/lib/ReportParser.php +++ b/htdocs/lib/ReportParser.php @@ -74,6 +74,20 @@ class ReportParser } } + function deleteRaw($id) + { + $q = kl_str_sql("delete from raw_reports where report_id=!i", $id); + + if ($res = DBH::$db->query($q)) + { + return true; + } + else + { + return false; + } + } + function getUnprocessedIDs() { $ret = array();