diff options
author | Brion Vibber <brion@pobox.com> | 2010-05-27 14:57:32 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-05-27 14:57:32 -0700 |
commit | 696aeea113b88fd0f6b7c4c88eebc2f4f369d245 (patch) | |
tree | c16f91a270c2989f8e6b3799b2dfa3e39698f565 /lib/stompqueuemanager.php | |
parent | cc25ec175530a691686087db4c23a1a28ffd1b62 (diff) | |
parent | 2f2fa100715f9c09b2b91a2d1afddacf7b7f16db (diff) |
Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x
Conflicts:
lib/language.php
plugins/OpenID/finishaddopenid.php
Diffstat (limited to 'lib/stompqueuemanager.php')
-rw-r--r-- | lib/stompqueuemanager.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/stompqueuemanager.php b/lib/stompqueuemanager.php index 5d5c7ccfb..de4ba7f01 100644 --- a/lib/stompqueuemanager.php +++ b/lib/stompqueuemanager.php @@ -122,7 +122,19 @@ class StompQueueManager extends QueueManager public function enqueue($object, $queue) { $this->_connect(); - return $this->_doEnqueue($object, $queue, $this->defaultIdx); + if (common_config('queue', 'stomp_enqueue_on')) { + // We're trying to force all writes to a single server. + // WARNING: this might do odd things if that server connection dies. + $idx = array_search(common_config('queue', 'stomp_enqueue_on'), + $this->servers); + if ($idx === false) { + common_log(LOG_ERR, 'queue stomp_enqueue_on setting does not match our server list.'); + $idx = $this->defaultIdx; + } + } else { + $idx = $this->defaultIdx; + } + return $this->_doEnqueue($object, $queue, $idx); } /** |