allow for multiple pubsub hubs so everything can still work when/if one goes flaky
(Google's hub has been particularly unreliable recently and the symptoms are that you just stop receiving updates, and/or updates you send are silently dropped and never delivered). Also add more instrumentation to help debug pubsub issues.
This commit is contained in:
parent
e9aa6eb0c7
commit
35a9b49ed0
4 changed files with 67 additions and 19 deletions
|
|
@ -22,7 +22,7 @@
|
|||
$a->set_baseurl(get_config('system','url'));
|
||||
|
||||
$contacts = q("SELECT * FROM `contact`
|
||||
WHERE ( `dfrn-id` != '' OR (`issued-id` != '' AND `duplex` = 1))
|
||||
WHERE `network` = 'dfrn' AND ( `dfrn-id` != '' OR (`issued-id` != '' AND `duplex` = 1))
|
||||
AND `self` = 0 AND `blocked` = 0 AND `readonly` = 0 ORDER BY RAND()");
|
||||
|
||||
if(! count($contacts))
|
||||
|
|
@ -174,7 +174,15 @@
|
|||
|
||||
|
||||
if((strlen($hub)) && ($contact['rel'] == REL_BUD) && ($contact['priority'] == 0)) {
|
||||
subscribe_to_hub($hub,$importer,$contact);
|
||||
$hubs = explode(',', $hub);
|
||||
if(count($hubs)) {
|
||||
foreach($hubs as $h) {
|
||||
$h = trim($h);
|
||||
if(! strlen($h))
|
||||
continue;
|
||||
subscribe_to_hub($h,$importer,$contact);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue