]> git.wh0rd.org Git - tt-rss.git/commitdiff
bump up debugging in daemon
authorAndrew Dolgov <fox@bah.spb.su>
Wed, 14 Mar 2007 14:50:28 +0000 (15:50 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Wed, 14 Mar 2007 14:50:28 +0000 (15:50 +0100)
functions.php
update_daemon.php

index db21caba08393a783715613a7a2cfbe55a86e890..5bcbfc1d7a3fd3cf02aa92e3edc16975f90eb693 100644 (file)
                        return;                 
                }
 
+               if (defined('DAEMON_EXTENDED_DEBUG')) {
+                       print "update_rss_feed: start\n";
+               }
+
                $result = db_query($link, "SELECT update_interval,auth_login,auth_pass  
                        FROM ttrss_feeds WHERE id = '$feed'");
 
 
                }
 
-               error_reporting(0);
+               if (defined('DAEMON_EXTENDED_DEBUG')) {
+                       print "update_rss_feed: fetching...\n";
+               }
+
+               if (!defined('DAEMON_EXTENDED_DEBUG')) {
+                       error_reporting(0);
+               }
+
                $rss = fetch_rss($fetch_url);
-               error_reporting (DEFAULT_ERROR_LEVEL);
-               
+
+               if (defined('DAEMON_EXTENDED_DEBUG')) {
+                       print "update_rss_feed: fetch done, parsing...\n";
+               } else {
+                       error_reporting (DEFAULT_ERROR_LEVEL);
+               }
+
                $feed = db_escape_string($feed);
 
                if ($rss) {
                                        last_updated = NOW() WHERE id = '$feed'");
                }
 
+               if (defined('DAEMON_EXTENDED_DEBUG')) {
+                       print "update_rss_feed: done\n";
+               }
+
        }
 
        function print_select($id, $default, $values, $attributes = "") {
index 32054c5b3c2801ea6866ff0f555b7797b348c63b..f99e4f76379f13ded6169310c5ac414f1ad38fed 100644 (file)
@@ -4,12 +4,12 @@
        // continuously
 
        define('DEFAULT_ERROR_LEVEL', E_ALL);
-       error_reporting(E_ALL);
 
        declare(ticks = 1);
 
        define('MAGPIE_CACHE_DIR', '/var/tmp/magpie-ttrss-cache-daemon');
        define('DISABLE_SESSIONS', true);
+       define('DAEMON_EXTENDED_DEBUG', true);
 
        define('PURGE_INTERVAL', 3600); // seconds
 
@@ -25,6 +25,8 @@
        require_once "functions.php";
        require_once "magpierss/rss_fetch.inc";
 
+       error_reporting(E_ALL);
+
        function sigint_handler() {
                unlink("update_daemon.lock");
                die("Received SIGINT. Exiting.\n");