summaryrefslogtreecommitdiff
path: root/plugins/OStatus/actions/pushcallback.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-02-21 13:40:59 -0800
committerBrion Vibber <brion@pobox.com>2010-02-21 13:40:59 -0800
commit5349aa420ed45c2f5bf773d10c7709826ae6babd (patch)
treeaee4444ba48f9e84c77ff6660daaf5d8ee15a2f7 /plugins/OStatus/actions/pushcallback.php
parent10f6c023f4573868326c4b6599bdfb66cffdd7d6 (diff)
OStatus feedsub fixlets:
- actually udpate feedsub.last_update when we get a new PuSH update in - move incoming PuSH processing to a queue handler to minimize time spent before POST return, as recommended by PuSH spec. When queues are disabled this'll still be handled immediately.
Diffstat (limited to 'plugins/OStatus/actions/pushcallback.php')
-rw-r--r--plugins/OStatus/actions/pushcallback.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/OStatus/actions/pushcallback.php b/plugins/OStatus/actions/pushcallback.php
index 7e1227a66..9e976a80d 100644
--- a/plugins/OStatus/actions/pushcallback.php
+++ b/plugins/OStatus/actions/pushcallback.php
@@ -60,9 +60,14 @@ class PushCallbackAction extends Action
$post = file_get_contents('php://input');
- // @fixme Queue this to a background process; we should return
+ // Queue this to a background process; we should return
// as quickly as possible from a distribution POST.
- $feedsub->receive($post, $hmac);
+ // If queues are disabled this'll process immediately.
+ $data = array('feedsub_id' => $feedsub->id,
+ 'post' => $post,
+ 'hmac' => $hmac);
+ $qm = QueueManager::get();
+ $qm->enqueue($data, 'pushinput');
}
/**