summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/apitimelinepublic.php6
-rw-r--r--lib/stompqueuemanager.php18
2 files changed, 11 insertions, 13 deletions
diff --git a/actions/apitimelinepublic.php b/actions/apitimelinepublic.php
index 3f4a46c0f..0fb0788e9 100644
--- a/actions/apitimelinepublic.php
+++ b/actions/apitimelinepublic.php
@@ -74,6 +74,10 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction
parent::prepare($args);
$this->notices = $this->getNotices();
+
+ if ($this->since) {
+ throw new ServerException("since parameter is disabled for performance; use since_id", 403);
+ }
return true;
}
@@ -145,7 +149,7 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction
$notice = Notice::publicStream(
($this->page - 1) * $this->count, $this->count, $this->since_id,
- $this->max_id, $this->since
+ $this->max_id
);
while ($notice->fetch()) {
diff --git a/lib/stompqueuemanager.php b/lib/stompqueuemanager.php
index 6730cd213..cc4c817d8 100644
--- a/lib/stompqueuemanager.php
+++ b/lib/stompqueuemanager.php
@@ -107,9 +107,10 @@ class StompQueueManager extends QueueManager
$message .= ':' . $param;
}
$this->_connect();
- $result = $this->_send($this->control,
- $message,
- array ('created' => common_sql_now()));
+ $con = $this->cons[$this->defaultIdx];
+ $result = $con->send($this->control,
+ $message,
+ array ('created' => common_sql_now()));
if ($result) {
$this->_log(LOG_INFO, "Sent control ping to queue daemons: $message");
return true;
@@ -368,17 +369,10 @@ class StompQueueManager extends QueueManager
foreach ($this->cons as $i => $con) {
if ($con) {
$this->rollback($i);
- $con->unsubscribe($this->control);
+ $con->disconnect();
+ $this->cons[$i] = null;
}
}
- if ($this->sites) {
- foreach ($this->sites as $server) {
- StatusNet::init($server);
- $this->doUnsubscribe();
- }
- } else {
- $this->doUnsubscribe();
- }
return true;
}