From: Zach Copley Date: Sat, 18 Jul 2009 01:07:53 +0000 (-0700) Subject: Moved $_id from queuehandler to daemon, as other daemons need it too. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=64853769b3b90e24b16dfd4d10de3f64b97fd5e5;p=quix0rs-gnu-social.git Moved $_id from queuehandler to daemon, as other daemons need it too. --- diff --git a/lib/daemon.php b/lib/daemon.php index 9d89c63e78..231f5414e9 100644 --- a/lib/daemon.php +++ b/lib/daemon.php @@ -24,6 +24,7 @@ if (!defined('LACONICA')) { class Daemon { var $daemonize = true; + var $_id = 'generic'; function __construct($daemonize = true) { @@ -35,6 +36,16 @@ class Daemon return null; } + function get_id() + { + return $this->_id; + } + + function set_id($id) + { + $this->_id = $id; + } + function background() { $pid = pcntl_fork(); diff --git a/lib/queuehandler.php b/lib/queuehandler.php index c2ff10f32f..f11e5bd90d 100644 --- a/lib/queuehandler.php +++ b/lib/queuehandler.php @@ -29,7 +29,6 @@ define('QUEUE_HANDLER_HIT_IDLE', 0); class QueueHandler extends Daemon { - var $_id = 'generic'; function __construct($id=null, $daemonize=true) { @@ -55,16 +54,6 @@ class QueueHandler extends Daemon return strtolower($this->class_name().'.'.$this->get_id()); } - function get_id() - { - return $this->_id; - } - - function set_id($id) - { - $this->_id = $id; - } - function transport() { return null;