diff options
author | Mario <mario@mariovavti.com> | 2019-11-15 10:01:21 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-11-15 10:01:21 +0000 |
commit | 5a6b14f8787927ee6ea99c622d02875811d3a74a (patch) | |
tree | 9a6297cb0551c5ca82739f81224eca479f1fc844 | |
parent | de9a7f0fa909792656d26d369f2ff21c57fc1e4d (diff) | |
download | volse-hubzilla-5a6b14f8787927ee6ea99c622d02875811d3a74a.tar.gz volse-hubzilla-5a6b14f8787927ee6ea99c622d02875811d3a74a.tar.bz2 volse-hubzilla-5a6b14f8787927ee6ea99c622d02875811d3a74a.zip |
onepoll: do not update dead feeds
-rw-r--r-- | Zotlabs/Daemon/Onepoll.php | 12 | ||||
-rw-r--r-- | include/feedutils.php | 4 |
2 files changed, 11 insertions, 5 deletions
diff --git a/Zotlabs/Daemon/Onepoll.php b/Zotlabs/Daemon/Onepoll.php index 1d9fd5f72..2f06ec125 100644 --- a/Zotlabs/Daemon/Onepoll.php +++ b/Zotlabs/Daemon/Onepoll.php @@ -61,11 +61,13 @@ class Onepoll { if($contact['xchan_network'] === 'rss') { logger('onepoll: processing feed ' . $contact['xchan_name'], LOGGER_DEBUG); - handle_feed($importer['channel_id'],$contact_id,$contact['xchan_hash']); - q("update abook set abook_connected = '%s' where abook_id = %d", - dbesc(datetime_convert()), - intval($contact['abook_id']) - ); + $alive = handle_feed($importer['channel_id'],$contact_id,$contact['xchan_hash']); + if ($alive) { + q("update abook set abook_connected = '%s' where abook_id = %d", + dbesc(datetime_convert()), + intval($contact['abook_id']) + ); + } return; } diff --git a/include/feedutils.php b/include/feedutils.php index 9f4d732bb..6d14eb5c4 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -1760,7 +1760,11 @@ function handle_feed($uid, $abook_id, $url) { if($z['success']) { consume_feed($z['body'], $channel, $x[0], 1); consume_feed($z['body'], $channel, $x[0], 2); + return true; } + + return false; + } |