]> git.mxchange.org Git - friendica.git/commitdiff
Use dual delivery when dealing with flaky hub, reduce poll to once/hour
authorMike Macgirvin <mike@macgirvin.com>
Mon, 11 Oct 2010 04:08:25 +0000 (21:08 -0700)
committerMike Macgirvin <mike@macgirvin.com>
Mon, 11 Oct 2010 04:08:25 +0000 (21:08 -0700)
include/poller.php

index 57c4cacfbeb10e92b0a36aad355b6d2146399096..b5a5f625873d9f64992da3f2945074e6cb6693bb 100644 (file)
@@ -30,7 +30,7 @@
 
        foreach($contacts as $contact) {
 
-               if($contact['priority']) {
+               if($contact['priority'] || $contact['subhub']) {
 
                        $update = false;
                        $t = $contact['last-update'];
                                        break;
                                case 1:
                                default:
+
+                                                       // if pubsub delivery is in effect, poll no more than once every hour.
+                                                       // We shouldn't need to poll at all with pubsub, but the hub isn't 
+                                                       // always the most reliable postmaster... This way we still get the 
+                                                       // messages when the hub goes flaky, just perhaps a bit slower. 
+                                                       // At least it doesn't hurt to get them twice. 
+
                                        if(datetime_convert('UTC','UTC', 'now') > datetime_convert('UTC','UTC', $t . " + 1 hour"))
                                                $update = true;
                                        break;