Browse Source

update_daemon_common: do not abort entire batch if PDOException happens when processing individual feeds

Andrew Dolgov 1 year ago
parent
commit
62d0060aa1
1 changed files with 6 additions and 1 deletions
  1. 6 1
      classes/rssutils.php

+ 6 - 1
classes/rssutils.php

@@ -187,7 +187,12 @@ class RSSUtils {
 					array_push($batch_owners, $tline["owner_uid"]);
 
 				$fstarted = microtime(true);
-				RSSUtils::update_rss_feed($tline["id"], true, false);
+
+				try {
+					RSSUtils::update_rss_feed($tline["id"], true, false);
+				} catch (PDOException $e) {
+					Logger::get()->log_error(E_USER_NOTICE, $e->getMessage(), $e->getFile(), $e->getLine(), $e->getTraceAsString());
+				}
 				_debug_suppress(false);
 
 				_debug(sprintf("    %.4f (sec)", microtime(true) - $fstarted));