accept -1 as a valid exit code for per-feed update processes

This commit is contained in:
Andrew Dolgov 2020-09-28 16:02:59 +03:00
parent de22464ea8
commit 7c8bed0524
1 changed files with 3 additions and 2 deletions

View File

@ -173,7 +173,8 @@ class RSSUtils {
Debug::log(sprintf("<= %.4f (sec) exit code: %d", microtime(true) - $fstarted, $exit_code)); Debug::log(sprintf("<= %.4f (sec) exit code: %d", microtime(true) - $fstarted, $exit_code));
if ($exit_code != 0) { // -1 can be caused by a SIGCHLD handler which daemon master process installs (not every setup, apparently)
if ($exit_code != 0 && $exit_code != -1) {
$esth = $pdo->prepare("SELECT last_error FROM ttrss_feeds WHERE id = ?"); $esth = $pdo->prepare("SELECT last_error FROM ttrss_feeds WHERE id = ?");
$esth->execute([$tline["id"]]); $esth->execute([$tline["id"]]);
@ -186,7 +187,7 @@ class RSSUtils {
Debug::log("!! Last error: $error_message"); Debug::log("!! Last error: $error_message");
Logger::get()->log( Logger::get()->log(
sprintf("Update process for feed %d (%s, owner UID: %d) terminated with non-zero exit code: %d (%s).", sprintf("Update process for feed %d (%s, owner UID: %d) failed with exit code: %d (%s).",
$tline["id"], clean($tline["title"]), $tline["owner_uid"], $exit_code, clean($error_message))); $tline["id"], clean($tline["title"]), $tline["owner_uid"], $exit_code, clean($error_message)));
} }