rename UPDATE_SCHEDULER to UPDATE_DAEMON, more update daemon work, update NEWS

This commit is contained in:
Andrew Dolgov 2006-02-12 06:06:04 +01:00
parent 633d263b04
commit 085a5a7440
5 changed files with 29 additions and 22 deletions

1
NEWS
View File

@ -2,6 +2,7 @@ v1.1.3 (Feb xx, 2006)
* Broken feed editor fixed * Broken feed editor fixed
* Compatibility layer for mb_* functions * Compatibility layer for mb_* functions
* Experimental server-side update daemon for asynchronous operation
v1.1.2 (Jan 20, 2006) v1.1.2 (Jan 20, 2006)

View File

@ -703,7 +703,7 @@
if ($subop == "forceUpdateAllFeeds" || $subop == "updateAllFeeds") { if ($subop == "forceUpdateAllFeeds" || $subop == "updateAllFeeds") {
if (ENABLE_UPDATE_SCHEDULER) { if (ENABLE_UPDATE_DAEMON) {
$result = db_query($link, "SELECT count(id) AS cid FROM $result = db_query($link, "SELECT count(id) AS cid FROM
ttrss_scheduled_updates WHERE feed_id IS NULL AND ttrss_scheduled_updates WHERE feed_id IS NULL AND
@ -731,8 +731,6 @@
update_all_feeds($link, $subop == "forceUpdateAllFeeds"); update_all_feeds($link, $subop == "forceUpdateAllFeeds");
} }
if (!(ENABLE_UPDATE_SCHEDULER && $subop == "forceUpdateAllFeeds")) {
$omode = $_GET["omode"]; $omode = $_GET["omode"];
if (!$omode) $omode = "tfl"; if (!$omode) $omode = "tfl";
@ -746,7 +744,7 @@
} }
getGlobalCounters($link); getGlobalCounters($link);
print "</rpc-reply>"; print "</rpc-reply>";
}
} }
/* GET["cmode"] = 0 - mark as read, 1 - as unread, 2 - toggle */ /* GET["cmode"] = 0 - mark as read, 1 - as unread, 2 - toggle */
@ -1036,7 +1034,7 @@
if ($subop == "ForceUpdate" && sprintf("%d", $feed) > 0) { if ($subop == "ForceUpdate" && sprintf("%d", $feed) > 0) {
/* if (ENABLE_UPDATE_SCHEDULER) { /* if (ENABLE_UPDATE_DAEMON) {
if ($cid == 0) { if ($cid == 0) {
@ -1052,7 +1050,7 @@
$tmp_result = db_query($link, "SELECT feed_url FROM ttrss_feeds $tmp_result = db_query($link, "SELECT feed_url FROM ttrss_feeds
WHERE id = '$feed'"); WHERE id = '$feed'");
$feed_url = db_fetch_result($tmp_result, 0, "feed_url"); $feed_url = db_fetch_result($tmp_result, 0, "feed_url");
update_rss_feed($link, $feed_url, $feed, ENABLE_UPDATE_SCHEDULER); update_rss_feed($link, $feed_url, $feed, ENABLE_UPDATE_DAEMON);
} }
if ($subop == "MarkAllRead") { if ($subop == "MarkAllRead") {

View File

@ -87,12 +87,12 @@
// It is also recommended to set FEEDS_FRAME_REFRESH to a lower value if using // It is also recommended to set FEEDS_FRAME_REFRESH to a lower value if using
// this option. // this option.
define('ENABLE_UPDATE_SCHEDULER', false); define('ENABLE_UPDATE_DAEMON', false);
// This enables different mechanism for user-triggered updates designed // This enables different mechanism for user-triggered updates designed
// for update daemon running in background on the server. // for update daemon running in background on the server.
// This option _REQUIRES_ DAEMON_REFRESH_ONLY to be enabled and it is // This option suggests FEEDS_FRAME_REFRESH set to a small value
// suggested to set FEEDS_FRAME_REFRESH to a small value (like 15-30 seconds). // (like 10-15 seconds, depending on number of users and server/bandwidth load).
// vim:ft=php // vim:ft=php
?> ?>

View File

@ -110,7 +110,9 @@
<select id="allFeedsChooser" onchange="allFeedsMenuChange()"> <select id="allFeedsChooser" onchange="allFeedsMenuChange()">
<option selected>All feeds...</option> <option selected>All feeds...</option>
<? if (!ENABLE_UPDATE_DAEMON) { ?>
<option>Update</option> <option>Update</option>
<? } ?>
<option>Mark as read</option> <option>Mark as read</option>
<option>Show only unread</option> <option>Show only unread</option>
</select> </select>
@ -218,7 +220,9 @@
<!-- <option>Edit this feed</option> --> <!-- <option>Edit this feed</option> -->
<option disabled>--------</option> <option disabled>--------</option>
<option style="color : #5050aa" disabled>All feeds:</option> <option style="color : #5050aa" disabled>All feeds:</option>
<? if (!ENABLE_UPDATE_DAEMON) { ?>
<option id="qmcUpdateFeeds">&nbsp;&nbsp;Update</option> <option id="qmcUpdateFeeds">&nbsp;&nbsp;Update</option>
<? } ?>
<option id="qmcCatchupAll">&nbsp;&nbsp;Mark as read</option> <option id="qmcCatchupAll">&nbsp;&nbsp;Mark as read</option>
<option id="qmcShowOnlyUnread">&nbsp;&nbsp;Show only unread</option> <option id="qmcShowOnlyUnread">&nbsp;&nbsp;Show only unread</option>
<option disabled>--------</option> <option disabled>--------</option>

View File

@ -34,9 +34,13 @@
while (true) { while (true) {
// FIXME: get all schedule updates w/forced refetch // FIXME: get all scheduled updates w/forced refetch
print "Checking schedules updates (NOT IMPLEMENTED YET)\n"; # $result = db_query($link, "SELECT * FROM ttrss_scheduled_updates ORDER BY id");
# while ($line = db_fetch_assoc($result)) {
# print "Scheduled feed update: " . $line["feed_id"] . ", UID: " .
# $line["owner_uid"] . "\n";
# }
// Process all other feeds using last_updated and interval parameters // Process all other feeds using last_updated and interval parameters