]> git.wh0rd.org - tt-rss.git/commitdiff
DAEMON_REFRESH_ONLY patch from the same source
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 28 Oct 2005 01:30:03 +0000 (02:30 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 28 Oct 2005 01:30:03 +0000 (02:30 +0100)
config.php-dist
functions.php

index f7848430a1fcd9b0219dc60da6a03490a2ddf7cc..9d86bddb25d29fb8733cc631fa5cbeaa0c0c9107 100644 (file)
        define(USE_COMPACT_STYLESHEET, false);
        // use stylesheet with more compact layout (if combined with two previous 
        // options may improve UI on small screens)
-       
+
+       define(DAEMON_REFRESH_ONLY, false);
+       // updates to all feeds will only run when the backend script is
+       // invoked with a "daemon" option on the URI stem. An example wget
+       // command line below will invoke an update every 30 minutes, with
+       // output being sent to /dev/null and the timeout set to 10 minutes
+       // so that wget does not time out. Substitute your site name, tt-rss
+       // path, and username/password as necessary.
+       //
+       // */30 * * * * /usr/bin/wget -O /dev/null -T 600 "http://username:password@www.your-site.xxx/tt-rss/backend.php?op=rpc&subop=updateAllFeeds&daemon=1"
+       //
+
 ?>
 
index e79ea21cc4a58e5f909402a7dbbac9dc11e9cdbb..e1fc66b0d36b1bf290914125f0d76bb294e23323 100644 (file)
 
                if (WEB_DEMO_MODE) return;
 
+               if (! ($_GET["daemon"] && DAEMON_REFRESH_ONLY)) {
+                       return;
+               }
+
                db_query($link, "BEGIN");
 
                $result = db_query($link, "SELECT feed_url,id,