diff options
author | Andrew Dolgov <[email protected]> | 2020-09-27 16:42:42 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2020-09-27 16:42:45 +0300 |
commit | d4d0e976dc371d6fb761d3e3713ca0f7182ebb40 (patch) | |
tree | 635a59aefe6a293e36f88b4da4088c5483876024 /update.php | |
parent | 0761533d0abb2851c9f52224f64ce28fc0746acd (diff) |
update-feed: exit with non-zero exit code if update_rss_feed() failed
daemon: log if per-feed update task terminated with non-zero exit code
Diffstat (limited to 'update.php')
-rwxr-xr-x | update.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/update.php b/update.php index d3ccdc236..c6af40715 100755 --- a/update.php +++ b/update.php @@ -260,12 +260,17 @@ if (isset($options["update-feed"])) { try { - RSSUtils::update_rss_feed($options["update-feed"], true); + + if (!RSSUtils::update_rss_feed($options["update-feed"], true)) + exit(100); + } catch (PDOException $e) { Debug::log(sprintf("Exception while updating feed %d: %s (%s:%d)", $options["update-feed"], $e->getMessage(), $e->getFile(), $e->getLine())); Logger::get()->log_error(E_USER_NOTICE, $e->getMessage(), $e->getFile(), $e->getLine(), $e->getTraceAsString()); + + exit(110); } } |