if(function_exists('sys_getloadavg')) {
$load = sys_getloadavg();
if(intval($load[0]) > $maxsysload) {
if(function_exists('sys_getloadavg')) {
$load = sys_getloadavg();
if(intval($load[0]) > $maxsysload) {
+ // run the process to discover global contacts in the background
+
+ proc_run('php',"include/discover_poco.php");
+
+ // run the process to update locally stored global contacts in the background
+
+ proc_run('php',"include/discover_poco.php", "checkcontact");
+
- if($contact['network'] === NETWORK_DFRN)
- $contact['priority'] = 2;
-
- if(!get_config('system','ostatus_use_priority') and ($contact['network'] === NETWORK_OSTATUS))
+ if(in_array($contact['network'], array(NETWORK_DFRN, NETWORK_ZOT, NETWORK_OSTATUS)))
- if($contact['priority'] || $contact['subhub']) {
-
- $hub_update = true;
- $update = false;
-
- $t = $contact['last-update'];
-
+ if($contact['subhub'] AND in_array($contact['network'], array(NETWORK_DFRN, NETWORK_ZOT, NETWORK_OSTATUS))) {
// We should be getting everything via a hub. But just to be sure, let's check once a day.
// (You can make this more or less frequent if desired by setting 'pushpoll_frequency' appropriately)
// This also lets us update our subscription to the hub, and add or replace hubs in case it
// changed. We will only update hubs once a day, regardless of 'pushpoll_frequency'.
// We should be getting everything via a hub. But just to be sure, let's check once a day.
// (You can make this more or less frequent if desired by setting 'pushpoll_frequency' appropriately)
// This also lets us update our subscription to the hub, and add or replace hubs in case it
// changed. We will only update hubs once a day, regardless of 'pushpoll_frequency'.
- if($contact['subhub']) {
- $poll_interval = get_config('system','pushpoll_frequency');
- $contact['priority'] = (($poll_interval !== false) ? intval($poll_interval) : 3);
- $hub_update = false;
+ if($contact['priority'] AND !$force) {