From 242e0abd86d2327915f7cdb8cfbcbf5409807e9e Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 4 Jun 2023 13:10:32 +0300 Subject: [PATCH] ban pages only on data type error codes only --- crontab/crawler.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crontab/crawler.php b/crontab/crawler.php index 692ec04..a4e614c 100644 --- a/crontab/crawler.php +++ b/crontab/crawler.php @@ -808,8 +808,9 @@ try { // Debug std var_dump($e); - // Ban page that throws the error and stuck the crawl queue - if (!empty($queueHostPage->hostPageId)) { + // Ban page that throws the data type error and stuck the crawl queue + if (!empty($queueHostPage->hostPageId) && + !empty($e->getCode()) && in_array($e->getCode(), [1366])) { // @TODO $hostPagesBanned = $db->updateHostPageTimeBanned($queueHostPage->hostPageId, time());