Browse Source

onepoll: do not update dead feeds

(cherry picked from commit 5a6b14f878)
master
Mario 1 year ago
parent
commit
05604e4bd2
2 changed files with 11 additions and 5 deletions
  1. +7
    -5
      Zotlabs/Daemon/Onepoll.php
  2. +4
    -0
      include/feedutils.php

+ 7
- 5
Zotlabs/Daemon/Onepoll.php View File

@ -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;
}

+ 4
- 0
include/feedutils.php View File

@ -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;
}

Loading…
Cancel
Save