]> git.wh0rd.org Git - tt-rss.git/commitdiff
rename UPDATE_SCHEDULER to UPDATE_DAEMON, more update daemon work, update NEWS
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 12 Feb 2006 05:06:04 +0000 (06:06 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 12 Feb 2006 05:06:04 +0000 (06:06 +0100)
NEWS
backend.php
config.php-dist
tt-rss.php
update_daemon.php

diff --git a/NEWS b/NEWS
index e34adb2869b0639e4593bd9e2ef2f35e1c250ba6..2190b9e869ae82ec927d12f36f69812a0743f9c7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ v1.1.3  (Feb xx, 2006)
 
        * Broken feed editor fixed
        * Compatibility layer for mb_* functions
+       * Experimental server-side update daemon for asynchronous operation
 
 v1.1.2 (Jan 20, 2006)
 
index f103a5abe9ee5c21bcd3ec038e363dd668b28594..f7dd6d178abda240745392a1f7a7efbadcc764c6 100644 (file)
 
                if ($subop == "forceUpdateAllFeeds" || $subop == "updateAllFeeds") {
        
-                       if (ENABLE_UPDATE_SCHEDULER) {
+                       if (ENABLE_UPDATE_DAEMON) {
 
                                $result = db_query($link, "SELECT count(id) AS cid FROM
                                        ttrss_scheduled_updates WHERE feed_id IS NULL AND
                                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";
-
-                               print "<rpc-reply>";
-                               if (strchr($omode, "l")) getLabelCounters($link);
-                               if (strchr($omode, "f")) getFeedCounters($link);
-                               if (strchr($omode, "t")) getTagCounters($link);
-                               if (get_pref($link, 'ENABLE_FEED_CATS')) {
-                                       getCategoryCounters($link);
-                               }
-                               getGlobalCounters($link);
-                               print "</rpc-reply>";
+                       print "<rpc-reply>";
+                       if (strchr($omode, "l")) getLabelCounters($link);
+                       if (strchr($omode, "f")) getFeedCounters($link);
+                       if (strchr($omode, "t")) getTagCounters($link);
+                       if (get_pref($link, 'ENABLE_FEED_CATS')) {
+                               getCategoryCounters($link);
                        }
+                       getGlobalCounters($link);
+                       print "</rpc-reply>";
+
                }
        
                /* GET["cmode"] = 0 - mark as read, 1 - as unread, 2 - toggle */
 
                if ($subop == "ForceUpdate" && sprintf("%d", $feed) > 0) {
 
-/*                     if (ENABLE_UPDATE_SCHEDULER) {
+/*                     if (ENABLE_UPDATE_DAEMON) {
 
                                if ($cid == 0) {
 
                        $tmp_result = db_query($link, "SELECT feed_url FROM ttrss_feeds
                                WHERE id = '$feed'");
                        $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")  {
index 7028ee01c889b0f05188cbf54f1bb287e458db94..eb7e2baa08ebe591d135fb6a4080cfe0d3d2acdd 100644 (file)
        // It is also recommended to set FEEDS_FRAME_REFRESH to a lower value if using
        // this option.
 
-       define('ENABLE_UPDATE_SCHEDULER', false);
+       define('ENABLE_UPDATE_DAEMON', false);
        // This enables different mechanism for user-triggered updates designed
        // for update daemon running in background on the server.
        
-       // This option _REQUIRES_ DAEMON_REFRESH_ONLY to be enabled and it is
-       // suggested to set FEEDS_FRAME_REFRESH to a small value (like 15-30 seconds).
+       // This option suggests FEEDS_FRAME_REFRESH set to a small value 
+       // (like 10-15 seconds, depending on number of users and server/bandwidth load).
        
        // vim:ft=php
 ?>
index 821c9b107cc1a4405422a8841575d34132247de0..1245be27440b810775021da9845bdb827da9009a 100644 (file)
                
                <select id="allFeedsChooser" onchange="allFeedsMenuChange()">
                        <option selected>All feeds...</option>
+                       <? if (!ENABLE_UPDATE_DAEMON) { ?>
                        <option>Update</option>
+                       <? } ?>
                        <option>Mark as read</option>
                        <option>Show only unread</option>
                </select>
                                <!-- <option>Edit this feed</option> -->
                                <option disabled>--------</option>
                                <option style="color : #5050aa" disabled>All feeds:</option>
+                               <? if (!ENABLE_UPDATE_DAEMON) { ?>
                                <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 disabled>--------</option>
                                <option style="color : #5050aa" disabled>Other actions:</option>                                
index d9a465a5ea339f220f6ae270b3d789ead16b7209..37c42ba1b8832c878932254c91a23661556757f9 100644 (file)
 
        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