aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Queue.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-02-16 11:16:44 +0000
committerMario <mario@mariovavti.com>2023-02-16 11:16:44 +0000
commitcbf8c4bdb274f8d9c326961b9d0bf0c2a2ac35a0 (patch)
tree5001c96fa80fc6a6edd71f9b2127b1a33299b3d4 /Zotlabs/Lib/Queue.php
parent321cd9f2e03bd3895aaf3bda70b5a67281610894 (diff)
downloadvolse-hubzilla-cbf8c4bdb274f8d9c326961b9d0bf0c2a2ac35a0.tar.gz
volse-hubzilla-cbf8c4bdb274f8d9c326961b9d0bf0c2a2ac35a0.tar.bz2
volse-hubzilla-cbf8c4bdb274f8d9c326961b9d0bf0c2a2ac35a0.zip
more queue updates from streams and remove a hz_syslog
Diffstat (limited to 'Zotlabs/Lib/Queue.php')
-rw-r--r--Zotlabs/Lib/Queue.php23
1 files changed, 12 insertions, 11 deletions
diff --git a/Zotlabs/Lib/Queue.php b/Zotlabs/Lib/Queue.php
index 23691408a..c48b59c86 100644
--- a/Zotlabs/Lib/Queue.php
+++ b/Zotlabs/Lib/Queue.php
@@ -166,17 +166,18 @@ class Queue {
$y = q("select site_update, site_dead from site where site_url = '%s' ",
dbesc($base)
);
- if($y) {
- if(intval($y[0]['site_dead'])) {
- self::remove_by_posturl($outq['outq_posturl']);
- logger('dead site ignored ' . $base);
- return;
- }
- if($y[0]['site_update'] < datetime_convert('UTC','UTC','now - 1 month')) {
- self::update($outq['outq_hash'], 10);
- logger('immediate delivery deferred for site ' . $base);
- return;
- }
+
+ // Don't bother delivering if the site is dead.
+ // And if we haven't heard from the site in over a month - let them through but 3 strikes you're out.
+ if ($y && (intval($y[0]['site_dead']) || ($y[0]['site_update'] < datetime_convert('UTC', 'UTC', 'now - 1 month') && $outq['outq_priority'] > 20 ))) {
+ q("update dreport set dreport_result = '%s' where dreport_queue = '%s'",
+ dbesc('site dead'),
+ dbesc($outq['outq_hash'])
+ );
+
+ self::remove_by_posturl($outq['outq_posturl']);
+ logger('dead site ignored ' . $base);
+ return;
}
else {