mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 21:35:56 +00:00
implement old log entry purging in update_daemon_common; add some more error types; tweak error log display
This commit is contained in:
@@ -148,6 +148,7 @@
|
||||
|
||||
expire_cached_files($debug);
|
||||
expire_lock_files($debug);
|
||||
expire_error_log($link, $debug);
|
||||
|
||||
$nf = 0;
|
||||
|
||||
@@ -1197,6 +1198,19 @@
|
||||
return $doc->saveXML($node);
|
||||
}
|
||||
|
||||
function expire_error_log($link, $debug) {
|
||||
if ($debug) _debug("Removing old error log entries...");
|
||||
|
||||
if (DB_TYPE == "pgsql") {
|
||||
db_query($link, "DELETE FROM ttrss_error_log
|
||||
WHERE created_at < NOW() - INTERVAL '7 days'");
|
||||
} else {
|
||||
db_query($link, "DELETE FROM ttrss_error_log
|
||||
WHERE created_at < DATE_SUB(NOW(), INTERVAL 7 DAY)");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function expire_lock_files($debug) {
|
||||
if ($debug) _debug("Removing old lock files...");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user