summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-02-24 20:36:36 +0000
committerBrion Vibber <brion@pobox.com>2010-02-24 20:36:36 +0000
commitc36bdc1ba535dc3e2dc9098dbe40735b1955d96d (patch)
tree8ff364c7042cf8fc4e24327982a9ddae9e20031c /lib/util.php
parent07214f1370547fcc64db34ce8c8a84ec70e0d5bd (diff)
- break OMB profile update pings to a background queue
- add event hooks to profile update pings - send Salmon pings with custom update-profile event to OStatus subscribees and groups (subscribers will see it on your next post) - fix OStatus queues with overlong transport names, should work on DB queues now - Ostatus_profile::notifyActivity() and ::notifyDeferred() now can take XML, Notice, or Activity for convenience
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/util.php b/lib/util.php
index 7fb2c6c4b..9354431f2 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1119,12 +1119,16 @@ function common_enqueue_notice($notice)
return true;
}
-function common_broadcast_profile($profile)
+/**
+ * Broadcast profile updates to OMB and other remote subscribers.
+ *
+ * Since this may be slow with a lot of subscribers or bad remote sites,
+ * this is run through the background queues if possible.
+ */
+function common_broadcast_profile(Profile $profile)
{
- // XXX: optionally use a queue system like http://code.google.com/p/microapps/wiki/NQDQ
- require_once(INSTALLDIR.'/lib/omb.php');
- omb_broadcast_profile($profile);
- // XXX: Other broadcasts...?
+ $qm = QueueManager::get();
+ $qm->enqueue($profile, "profile");
return true;
}