diff options
author | friendica <info@friendica.com> | 2014-03-27 15:35:29 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-03-27 15:35:29 -0700 |
commit | a0674af4169a8c929c89887d4e7796b21ee55a91 (patch) | |
tree | 1b3e673a0acbbf07377871c5c09015fc2abf44ba /include/poller.php | |
parent | 7b24b78af949f2645459e4698ee2f96a17becef4 (diff) | |
download | volse-hubzilla-a0674af4169a8c929c89887d4e7796b21ee55a91.tar.gz volse-hubzilla-a0674af4169a8c929c89887d4e7796b21ee55a91.tar.bz2 volse-hubzilla-a0674af4169a8c929c89887d4e7796b21ee55a91.zip |
firehose fixes and optimisations. In particular get rid of the unresponsive script warning when trying to load updates (sine they aren't our posts, we can't check for unseen, hence we can't really load updates). Also make the url selection pluggable.
Diffstat (limited to 'include/poller.php')
-rw-r--r-- | include/poller.php | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/include/poller.php b/include/poller.php index 9b8ac4165..19037ef17 100644 --- a/include/poller.php +++ b/include/poller.php @@ -167,31 +167,10 @@ function poller_run($argv, $argc){ } } - // pull in some public posts - $r = q("select site_url from site where site_url != '%s' order by rand() limit 1", - dbesc(z_root()) - ); + // pull in some public posts + proc_run('php','include/externals.php'); - if($r) { - $feedurl = $r[0]['site_url'] . '/zotfeed?f=&mindate=' . urlencode(datetime_convert('','','now - 15 days')); - $x = z_fetch_url($feedurl); - - if(($x) && ($x['success'])) { - $total = 0; - $j = json_decode($x['body'],true); - if($j['success'] && $j['messages']) { - require_once('include/identity.php'); - $sys = get_sys_channel(); - foreach($j['messages'] as $message) { - $results = process_delivery(array('hash' => 'undefined'), get_item_elements($message), - array(array('hash' => $sys['xchan_hash'])), false, true); - $total ++; - } - logger('import_public_posts: ' . $total . ' messages imported', LOGGER_DEBUG); - } - } - } $manual_id = 0; $generation = 0; |