diff options
author | Zach Copley <zach@controlyourself.ca> | 2009-09-08 16:02:57 -0700 |
---|---|---|
committer | Zach Copley <zach@controlyourself.ca> | 2009-09-08 16:02:57 -0700 |
commit | 9d87313eaebe8240393ac300a435f3b1332c8849 (patch) | |
tree | 6b7e7d69c63fc6801ad95477be9c11ccb7cd0a1a /lib/queuehandler.php | |
parent | 5efe588174c71979fc1970353c9a556ea441f138 (diff) | |
parent | beae3db41375879e725af053edf8041bbd76ac8c (diff) |
Merge branch '0.9.x' into pluginize-twitter-bridge
Conflicts:
plugins/TwitterBridge/twitterauthorization.php
Diffstat (limited to 'lib/queuehandler.php')
-rw-r--r-- | lib/queuehandler.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/queuehandler.php b/lib/queuehandler.php index f11e5bd90..8c65a97c6 100644 --- a/lib/queuehandler.php +++ b/lib/queuehandler.php @@ -1,7 +1,7 @@ <?php /* - * Laconica - a distributed open-source microblogging tool - * Copyright (C) 2008, 2009, Control Yourself, Inc. + * 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 * it under the terms of the GNU Affero General Public License as published by @@ -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; } |