]> git.wh0rd.org Git - tt-rss.git/commitdiff
add some piggy-backed counters to improve reliability
authorAndrew Dolgov <fox@madoka.spb.ru>
Wed, 21 May 2008 04:19:03 +0000 (05:19 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Wed, 21 May 2008 04:19:03 +0000 (05:19 +0100)
backend.php
feedlist.js

index 94a63dae13a30f98abcd9292288f614f3ec545e7..20411cc0ae17d3aa8bb731c57985a81b8e4d2338 100644 (file)
                                }
                        }
 
-/*                     if ($mode != "prefetch_old") {
+                       if ($mode != "prefetch_old") {
                                print "<counters>";
                                getAllCounters($link, $omode);
                                print "</counters>";
-                       } */
+                       }
 
                        print "</reply>";
                break; // view
 
                        if ($_GET["debug"]) $timing_info = print_checkpoint("20", $timing_info);
 
-/*                     if (time() - $_SESSION["get_all_counters_stamp"] > 300) {
+                       if (time() - $_SESSION["get_all_counters_stamp"] > 300) {
                                print "<counters>";
                                getAllCounters($link, $omode, $feed);
                                print "</counters>";
-                       } */
+                       }
 
                        if ($_GET["debug"]) $timing_info = print_checkpoint("30", $timing_info);
 
index e3e2cda3fd4bce315103e94345f61f9f084756a2..4f5c8d7750ccd97e52d313098185104710b4ee57 100644 (file)
@@ -503,6 +503,9 @@ function mouse_up_handler(e) {
 function request_counters_real() {
 
        try {
+
+               debug("requesting counters...");
+
                var query = "backend.php?op=rpc&subop=getAllCounters";
 
                if (tagsAreDisplayed()) {
@@ -535,7 +538,7 @@ function request_counters() {
 
                if (timestamp - counters_last_request > 10) {
                        debug("scheduling request of counters...");
-                       window.setTimeout("request_counters_real()", 100);
+                       window.setTimeout("request_counters_real()", 1000);
                        counters_last_request = timestamp;
                } else {
                        debug("request_counters: rate limit reached: " + (timestamp - counters_last_request));