summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-01-28 13:35:09 -0800
committerBrion Vibber <brion@pobox.com>2010-01-28 13:35:09 -0800
commitd00ce3854932820cbdb906404d248800c400cbca (patch)
tree2dafb5ce3d749cebf286d614ad438c466b9252d1 /lib
parentd773ed8193ee63db360386507e0511d1742b2dd1 (diff)
parent513f8be07a22d722b86509e570bee46d028066f2 (diff)
Merge commit 'origin/master' into testing
Diffstat (limited to 'lib')
-rw-r--r--lib/default.php1
-rw-r--r--lib/stompqueuemanager.php10
-rw-r--r--lib/util.php1
3 files changed, 7 insertions, 5 deletions
diff --git a/lib/default.php b/lib/default.php
index c729193b5..8de8b1097 100644
--- a/lib/default.php
+++ b/lib/default.php
@@ -84,6 +84,7 @@ $default =
'control_channel' => '/topic/statusnet-control', // broadcasts to all queue daemons
'stomp_username' => null,
'stomp_password' => null,
+ 'stomp_persistent' => true, // keep items across queue server restart, if persistence is enabled
'monitor' => null, // URL to monitor ping endpoint (work in progress)
'softlimit' => '90%', // total size or % of memory_limit at which to restart queue threads gracefully
'debug_memory' => false, // true to spit memory usage to log
diff --git a/lib/stompqueuemanager.php b/lib/stompqueuemanager.php
index 19e8c49b5..4e2b58602 100644
--- a/lib/stompqueuemanager.php
+++ b/lib/stompqueuemanager.php
@@ -174,12 +174,13 @@ class StompQueueManager extends QueueManager
$this->_connect();
- // XXX: serialize and send entire notice
-
+ $props = array('created' => common_sql_now());
+ if (common_config('queue', 'stomp_persistent')) {
+ $props['persistent'] = 'true';
+ }
$result = $this->con->send($this->queueName($queue),
$msg, // BODY of the message
- array ('created' => common_sql_now(),
- 'persistent' => 'true'));
+ $props);
if (!$result) {
common_log(LOG_ERR, "Error sending $rep to $queue queue");
@@ -242,6 +243,7 @@ class StompQueueManager extends QueueManager
parent::start($master);
$this->_connect();
+ common_log(LOG_INFO, "Subscribing to $this->control");
$this->con->subscribe($this->control);
if ($this->sites) {
foreach ($this->sites as $server) {
diff --git a/lib/util.php b/lib/util.php
index 4312f9876..dd8189a58 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -178,7 +178,6 @@ function common_ensure_session()
}
if (isset($id)) {
session_id($id);
- setcookie(session_name(), $id);
}
@session_start();
if (!isset($_SESSION['started'])) {