aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Onepoll.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-11-17 11:50:13 +0000
committerMario <mario@mariovavti.com>2022-11-17 11:50:13 +0000
commit0e6b27c9f46141c3ca92fc8dddc51d866cf5f3c9 (patch)
tree3f6e8bd535cd23e3bfe88a873ba432fad231d4cb /Zotlabs/Daemon/Onepoll.php
parent0e157e4e8b480b4a848a05e73aa11dfcd54dfd9b (diff)
downloadvolse-hubzilla-0e6b27c9f46141c3ca92fc8dddc51d866cf5f3c9.tar.gz
volse-hubzilla-0e6b27c9f46141c3ca92fc8dddc51d866cf5f3c9.tar.bz2
volse-hubzilla-0e6b27c9f46141c3ca92fc8dddc51d866cf5f3c9.zip
if a feed fails, do not update connected timestamp. attempt to poll feeds only once a day if we could not fetch it last time we tried
Diffstat (limited to 'Zotlabs/Daemon/Onepoll.php')
-rw-r--r--Zotlabs/Daemon/Onepoll.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/Zotlabs/Daemon/Onepoll.php b/Zotlabs/Daemon/Onepoll.php
index f2b5d8c58..0a30a0c7d 100644
--- a/Zotlabs/Daemon/Onepoll.php
+++ b/Zotlabs/Daemon/Onepoll.php
@@ -64,12 +64,21 @@ class Onepoll {
if ($contact['xchan_network'] === 'rss') {
logger('onepoll: processing feed ' . $contact['xchan_name'], LOGGER_DEBUG);
$alive = handle_feed($importer['channel_id'], $contact_id, $contact['xchan_hash']);
- if ($alive) {
- q("update abook set abook_connected = '%s' where abook_id = %d",
+
+ if (!$alive) {
+ q("update abook set abook_updated = '%s' where abook_id = %d",
dbesc(datetime_convert()),
intval($contact['abook_id'])
);
+ return;
}
+
+ q("update abook set abook_updated = '%s', abook_connected = '%s' where abook_id = %d",
+ dbesc(datetime_convert()),
+ dbesc(datetime_convert()),
+ intval($contact['abook_id'])
+ );
+
return;
}