die; } catch (Exception $x) { echo PHP_EOL . PHP_EOL; echo "Fatal error occured retrieving comments:" . PHP_EOL; echo " " . $x->getMessage() . PHP_EOL . PHP_EOL; echo PHP_EOL . PHP_EOL; echo $x->getTraceAsString(); echo PHP_EOL . PHP_EOL; die; } # catch ## Reports try { $newReportCount = 0; if ($settings->get('retrieve_reports')) { $retriever = new SpotRetriever_Reports($settings_nntp_hdr, $db, $settings, $req->getDef('output', '')); $msgdata = $retriever->connect($settings->get('report_group')); $curMsg = $db->getMaxArticleId('reports'); if ($curMsg != 0) { $curMsgTemp = $retriever->searchMessageId($db->getMaxMessageId('reports')); if ($curMsg > $curMsgTemp) { $curMsg = $curMsgTemp; } # if } # if $newReportCount = $retriever->loopTillEnd($curMsg, $settings->get('retrieve_increment')); $retriever->quit(); } # if } catch (NntpException $x) {
echo ', done.' . PHP_EOL; } # if /* * Should we retrieve comments? */ if ($settings->get('retrieve_comments')) { $retriever = new SpotRetriever_Comments($settings_nntp_hdr, $db, $settings, $req->getDef('output', ''), $debugLog, $retroMode); $newCommentCount = $retriever->perform(); } # if /* * Retrieval of reports */ if ($settings->get('retrieve_reports') && !$retroMode) { $retriever = new SpotRetriever_Reports($settings_nntp_hdr, $db, $settings, $req->getDef('output', ''), $debugLog); $newReportCount = $retriever->perform(); } # if /* * SpotStateList cleanup */ $db->cleanSpotStateList(); if (!$retroMode) { $db->expireCache(30); } # if } catch (RetrieverRunningException $x) { echo PHP_EOL . PHP_EOL; die("retriever.php is already running, pass '--force' to ignore this warning." . PHP_EOL); } catch (NntpException $x) {