Merge branch 'master' of git.fakecake.org:tt-rss
This commit is contained in:
commit
8d75a542cd
|
@ -187,11 +187,11 @@ class RSSUtils {
|
||||||
|
|
||||||
// -1 can be caused by a SIGCHLD handler which daemon master process installs (not every setup, apparently)
|
// -1 can be caused by a SIGCHLD handler which daemon master process installs (not every setup, apparently)
|
||||||
if ($exit_code != 0 && $exit_code != -1) {
|
if ($exit_code != 0 && $exit_code != -1) {
|
||||||
$esth = $pdo->prepare("SELECT last_error FROM ttrss_feeds WHERE id = ?");
|
$festh = $pdo->prepare("SELECT last_error FROM ttrss_feeds WHERE id = ?");
|
||||||
$esth->execute([$tline["id"]]);
|
$festh->execute([$tline["id"]]);
|
||||||
|
|
||||||
if ($erow = $esth->fetch()) {
|
if ($ferow = $festh->fetch()) {
|
||||||
$error_message = $erow["last_error"];
|
$error_message = $ferow["last_error"];
|
||||||
} else {
|
} else {
|
||||||
$error_message = "N/A";
|
$error_message = "N/A";
|
||||||
}
|
}
|
||||||
|
@ -201,6 +201,13 @@ class RSSUtils {
|
||||||
Logger::get()->log(E_USER_NOTICE,
|
Logger::get()->log(E_USER_NOTICE,
|
||||||
sprintf("Update process for feed %d (%s, owner UID: %d) failed with 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)));
|
||||||
|
|
||||||
|
$combined_error_message = sprintf("Update process failed with exit code: %d (%s)",
|
||||||
|
$exit_code, clean($error_message));
|
||||||
|
|
||||||
|
# mark failed feed as having an update error (unless it is already marked)
|
||||||
|
$fusth = $pdo->prepare("UPDATE ttrss_feeds SET last_error = ? WHERE id = ? AND last_error = ''");
|
||||||
|
$fusth->execute([$combined_error_message, $tline["id"]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue