mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-19 14:01:30 +00:00
fix hanged daemon notification
This commit is contained in:
@@ -2702,23 +2702,24 @@
|
|||||||
print "<param key=\"daemon_is_running\" value=\"".
|
print "<param key=\"daemon_is_running\" value=\"".
|
||||||
sprintf("%d", file_is_locked("update_daemon.lock")) . "\"/>";
|
sprintf("%d", file_is_locked("update_daemon.lock")) . "\"/>";
|
||||||
|
|
||||||
if ($_SESSION["daemon_stamp_check"] + 600 < time()) {
|
if (time() - $_SESSION["daemon_stamp_check"] > 600) {
|
||||||
|
|
||||||
$stamp = (int)read_stampfile("update_daemon.stamp");
|
$stamp = (int)read_stampfile("update_daemon.stamp");
|
||||||
|
|
||||||
if ($stamp) {
|
if ($stamp) {
|
||||||
if ($stamp + 86400*3 < time()) {
|
if (time() - $stamp > 86400) {
|
||||||
print "<param key=\"daemon_stamp_ok\" value=\"0\"/>";
|
$stamp_check = 0;
|
||||||
} else {
|
} else {
|
||||||
print "<param key=\"daemon_stamp_ok\" value=\"1\"/>";
|
$stamp_check = 1;
|
||||||
|
$_SESSION["daemon_stamp_check"] = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "<param key=\"daemon_stamp_ok\" value=\"$stamp_check\"/>";
|
||||||
|
|
||||||
$stamp_fmt = date("Y.m.d, G:i", $stamp);
|
$stamp_fmt = date("Y.m.d, G:i", $stamp);
|
||||||
|
|
||||||
print "<param key=\"daemon_stamp\" value=\"$stamp_fmt\"/>";
|
print "<param key=\"daemon_stamp\" value=\"$stamp_fmt\"/>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$_SESSION["daemon_stamp_check"] = time();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,11 @@
|
|||||||
print __("Update daemon is enabled in configuration, but daemon
|
print __("Update daemon is enabled in configuration, but daemon
|
||||||
process is not running, which prevents all feeds from updating. Please
|
process is not running, which prevents all feeds from updating. Please
|
||||||
start the daemon process or contact instance owner.");
|
start the daemon process or contact instance owner.");
|
||||||
|
|
||||||
|
$stamp = (int)read_stampfile("update_daemon.stamp");
|
||||||
|
|
||||||
|
print "<p>" . __("Last update:") . " " . date("Y.m.d, G:i", $stamp);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($param == 2) {
|
if ($param == 2) {
|
||||||
@@ -31,6 +36,11 @@
|
|||||||
perform a feed update. This could indicate a problem like crash
|
perform a feed update. This could indicate a problem like crash
|
||||||
or a hang. Please check the daemon process or contact instance
|
or a hang. Please check the daemon process or contact instance
|
||||||
owner.");
|
owner.");
|
||||||
|
|
||||||
|
$stamp = (int)read_stampfile("update_daemon.stamp");
|
||||||
|
|
||||||
|
print "<p>" . __("Last update:") . " " . date("Y.m.d, G:i", $stamp);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|||||||
Reference in New Issue
Block a user