]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/queuehandler.php
Some UI adjustments for form notice
[quix0rs-gnu-social.git] / lib / queuehandler.php
index 26582a6cf50ac305dc0e7c524ef3ecd3ceadd574..8c65a97c668667b3ea05fe97a5f7d4fa91fe1ef2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
- * StatusNet - a distributed open-source microblogging tool
+ * StatusNet - the distributed open-source microblogging tool
  * Copyright (C) 2008, 2009, StatusNet, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-if (!defined('LACONICA')) { exit(1); }
+if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
 
 require_once(INSTALLDIR.'/lib/daemon.php');
 require_once(INSTALLDIR.'/classes/Queue_item.php');
@@ -75,6 +75,7 @@ class QueueHandler extends Daemon
     function run()
     {
         if (!$this->start()) {
+            $this->log(LOG_WARNING, 'failed to start');
             return false;
         }
 
@@ -87,9 +88,15 @@ class QueueHandler extends Daemon
 
         $qm->service($queue, $this);
 
+        $this->log(LOG_INFO, 'finished servicing the queue');
+
         if (!$this->finish()) {
+            $this->log(LOG_WARNING, 'failed to clean up');
             return false;
         }
+
+        $this->log(LOG_INFO, 'terminating normally');
+
         return true;
     }