diff options
author | friendica <info@friendica.com> | 2013-01-25 15:36:18 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-01-25 15:36:18 -0800 |
commit | 318d75a86a3cc4f5a4dcf1278c9a8236c24ac12a (patch) | |
tree | c37b24bb68cb87cd373b2d0acdb32fab299a4072 /include/onepoll.php | |
parent | a8575199af9c1697af49ff8a4f15eb904a1773d5 (diff) | |
download | volse-hubzilla-318d75a86a3cc4f5a4dcf1278c9a8236c24ac12a.tar.gz volse-hubzilla-318d75a86a3cc4f5a4dcf1278c9a8236c24ac12a.tar.bz2 volse-hubzilla-318d75a86a3cc4f5a4dcf1278c9a8236c24ac12a.zip |
poco debugging cont.
Diffstat (limited to 'include/onepoll.php')
-rw-r--r-- | include/onepoll.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/onepoll.php b/include/onepoll.php index 99c6df998..5bc7742d1 100644 --- a/include/onepoll.php +++ b/include/onepoll.php @@ -4,6 +4,8 @@ require_once('boot.php'); require_once('include/cli_startup.php'); require_once('include/zot.php'); require_once('include/socgraph.php'); +require_once('include/Contact.php'); + function onepoll_run($argv, $argc){ @@ -68,7 +70,7 @@ function onepoll_run($argv, $argc){ logger("onepoll: poll: ({$contact['id']}) IMPORTER: {$importer['xchan_name']}, CONTACT: {$contact['xchan_name']}"); - $last_update = (($contact['last_update'] === '0000-00-00 00:00:00') + $last_update = (($contact['abook_updated'] === '0000-00-00 00:00:00') ? datetime_convert('UTC','UTC','now - 7 days') : datetime_convert('UTC','UTC',$contact['abook_updated']) ); @@ -77,20 +79,27 @@ function onepoll_run($argv, $argc){ $x = zot_refresh($contact,$importer); + $responded = false; + if(! $x) { // mark for death } else { - q("update abook set abook_updated = '%s' where abook_id = %d limit 1", + q("update abook set abook_updated = '%s', abook_connected = '%s' where abook_id = %d limit 1", + dbesc(datetime_convert()), dbesc(datetime_convert()), intval($contact['abook_id']) ); + $responded = true; // if marked for death, reset } + if(! $responded) + return; + if($contact['xchan_connurl']) { $feedurl = str_replace('/poco/','/zotfeed/',$channel['xchan_connurl']); |