diff options
author | Sarven Capadisli <csarven@status.net> | 2010-01-28 19:37:31 +0100 |
---|---|---|
committer | Sarven Capadisli <csarven@status.net> | 2010-01-28 19:37:31 +0100 |
commit | 86fed21c14e6045aa7d637b240931dc9dfb6daf9 (patch) | |
tree | 95a377144f1ea6cb7ce2fd1ca0ab3acb1775a360 /lib | |
parent | 171c97f17eecb3165d6ac088fece15a56f7c9914 (diff) | |
parent | a868a523a5ab042e75d333298a75aaa369d445cc (diff) |
Merge branch 'master' of git@gitorious.org:statusnet/mainline
Diffstat (limited to 'lib')
-rw-r--r-- | lib/default.php | 1 | ||||
-rw-r--r-- | lib/stompqueuemanager.php | 9 |
2 files changed, 6 insertions, 4 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 da70d9ae3..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"); |