aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-11-25 23:42:03 -0800
committerFriendika <info@friendika.com>2010-11-25 23:42:03 -0800
commite15b1a87555caecef902b975349a9a930f9bb0e7 (patch)
treef7f8d3b1f350a22ebaf33690b719b26cb9ab90c3 /include
parent1f69e12e1e3aad003a714b543c4874c3082ce6df (diff)
downloadvolse-hubzilla-e15b1a87555caecef902b975349a9a930f9bb0e7.tar.gz
volse-hubzilla-e15b1a87555caecef902b975349a9a930f9bb0e7.tar.bz2
volse-hubzilla-e15b1a87555caecef902b975349a9a930f9bb0e7.zip
don't attempt to deliver queued items to sites which have already timed out
Diffstat (limited to 'include')
-rw-r--r--include/queue.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/queue.php b/include/queue.php
index 837ae31d7..96ddfa81b 100644
--- a/include/queue.php
+++ b/include/queue.php
@@ -33,6 +33,8 @@ function remove_queue_item($id) {
$a->set_baseurl(get_config('system','url'));
+ $deadguys = array();
+
logger('queue: start');
$r = q("SELECT `queue`.*, `contact`.`name`, `contact`.`uid` FROM `queue`
@@ -69,6 +71,12 @@ function remove_queue_item($id) {
remove_queue_item($q_item['id']);
continue;
}
+ if(in_array($c[0]['notify'],$deadguys)) {
+ logger('queue: skipping known dead url: ' . $c[0]['notify']);
+ update_queue_time($q_item['id']);
+ continue;
+ }
+
$u = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
intval($c[0]['uid'])
);
@@ -88,11 +96,13 @@ function remove_queue_item($id) {
logger('queue: dfrndelivery: item ' . $q_item['id'] . ' for ' . $contact['name']);
$deliver_status = dfrn_deliver($owner,$contact,$data);
- if($deliver_status == (-1))
+ if($deliver_status == (-1)) {
update_queue_time($q_item['id']);
- else
+ $deadguys[] = $contact['notify'];
+ }
+ else {
remove_queue_item($q_item['id']);
-
+ }
break;
default:
if($contact['notify']) {