X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fpoller.php;h=66df080a9dbdce632b77e153a735072892cd0334;hb=3ad7c395fb9a33319531e04673563e7c9983d8f0;hp=0dbc6f5831459d07700cf83d0d1db86a1f526519;hpb=a598f17e6d95d8a82df2994d61bfab74271dfe58;p=friendica.git diff --git a/include/poller.php b/include/poller.php index 0dbc6f5831..66df080a9d 100644 --- a/include/poller.php +++ b/include/poller.php @@ -28,19 +28,22 @@ function poller_run($argv, $argc){ // run queue delivery process in the background $php_path = ((x($a->config,'php_path') && strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); - //proc_close(proc_open("\"$php_path\" \"include/queue.php\" &", array(), $foo)); proc_run($php_path,"include/queue.php"); + + // clear old cache + q("DELETE FROM `cache` WHERE `updated`<'%s'", + dbesc(datetime_convert('UTC','UTC',"now - 30 days"))); - + $manual_id = 0; $hub_update = false; - $force = false; + $force = false; if(($argc > 1) && ($argv[1] == 'force')) $force = true; if(($argc > 1) && intval($argv[1])) { $manual_id = intval($argv[1]); - $force = true; + $force = true; } $sql_extra = (($manual_id) ? " AND `id` = $manual_id " : ""); @@ -58,6 +61,9 @@ function poller_run($argv, $argc){ foreach($contacts as $contact) { + if($manual_id) + $contact['last-update'] = '0000-00-00 00:00:00'; + if($contact['priority'] || $contact['subhub']) { $hub_update = true; @@ -232,6 +238,7 @@ function poller_run($argv, $argc){ $xml = post_url($contact['poll'],$postvars); } else { + // $contact['network'] !== 'dfrn' $xml = fetch_url($contact['poll']); @@ -239,8 +246,14 @@ function poller_run($argv, $argc){ logger('poller: received xml : ' . $xml, LOGGER_DATA); - if(! strlen($xml)) + if(! strstr($xml,'