]> git.wh0rd.org Git - tt-rss.git/commitdiff
update_daemon2: don't expect client part to be executable
authorAndrew Dolgov <fox@madoka.spb.ru>
Wed, 23 Jan 2008 14:29:24 +0000 (15:29 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Wed, 23 Jan 2008 14:29:24 +0000 (15:29 +0100)
update_daemon2.php
update_daemon2_client.php

index 68989c8e4a130bcfdd582fa70928a6d12c38a153..d422c536876d3ff11ed1dd289334d0a015272a43 100644 (file)
@@ -13,6 +13,7 @@
        define('MAX_JOBS', 2);
        define('CLIENT_PROCESS', './update_daemon2_client.php SRV_RUN_OK');
        define('SPAWN_INTERVAL', DAEMON_SLEEP_INTERVAL);
+       define('PHP_EXECUTABLE', '/usr/bin/php');
 
        $running_jobs = 0;
        $last_checkpoint = -1;
@@ -69,7 +70,7 @@
                                } else {
                                        pcntl_signal(SIGCHLD, SIG_IGN);
                                        pcntl_signal(SIGINT, SIG_DFL);
-                                       passthru(CLIENT_PROCESS);
+                                       passthru(PHP_EXECUTABLE . ' ' . CLIENT_PROCESS);
                                        exit(0);
                                }
                        }
index ff3ac1d33b6e8874390923ff099a0c52dcd027af..8934cbe497b0750530d5256fc6ed1749e00ea1be 100644 (file)
@@ -3,6 +3,8 @@
        // define('DEFAULT_ERROR_LEVEL', E_ALL);
        define('DEFAULT_ERROR_LEVEL', E_ERROR | E_WARNING | E_PARSE);
 
+       $start_timestamp = time();
+
        if ($argv[1] != "SRV_RUN_OK") {
                die("This script should be started by update_daemon2.php.\n");
        }
 
        if (DAEMON_SENDS_DIGESTS) send_headlines_digests($link);
 
+       print "Elapsed time: " . (time() - $start_timestamp) . " second(s)\n";
+
        db_close($link);
 ?>