mirror of
https://github.com/friendica/friendica
synced 2025-05-12 04:24:11 +02:00
Delivery count now counts the failed delivery attempts as well
This commit is contained in:
parent
4c4ed63dca
commit
5a1a5a54dc
8 changed files with 49 additions and 11 deletions
|
@ -54,8 +54,8 @@ class APDelivery extends BaseObject
|
|||
}
|
||||
}
|
||||
|
||||
if (!$success) {
|
||||
Worker::defer();
|
||||
if (!$success && !Worker::defer() && in_array($cmd, [Delivery::POST])) {
|
||||
ItemDeliveryData::incrementQueueFailed($target_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -327,7 +327,9 @@ class Delivery extends BaseObject
|
|||
Model\Contact::markForArchival($contact);
|
||||
|
||||
Logger::info('Delivery failed: defer message', ['id' => defaults($target_item, 'guid', $target_item['id'])]);
|
||||
Worker::defer();
|
||||
if (!Worker::defer() && in_array($cmd, [Delivery::POST, Delivery::POKE])) {
|
||||
Model\ItemDeliveryData::incrementQueueFailed($target_item['id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -412,7 +414,9 @@ class Delivery extends BaseObject
|
|||
if (empty($contact['contact-type']) || ($contact['contact-type'] != Model\Contact::TYPE_RELAY)) {
|
||||
Logger::info('Delivery failed: defer message', ['id' => defaults($target_item, 'guid', $target_item['id'])]);
|
||||
// defer message for redelivery
|
||||
Worker::defer();
|
||||
if (!Worker::defer() && in_array($cmd, [Delivery::POST, Delivery::POKE])) {
|
||||
Model\ItemDeliveryData::incrementQueueFailed($target_item['id'], Model\ItemDeliveryData::DIASPORA);
|
||||
}
|
||||
} elseif (in_array($cmd, [Delivery::POST, Delivery::POKE])) {
|
||||
Model\ItemDeliveryData::incrementQueueDone($target_item['id'], Model\ItemDeliveryData::DIASPORA);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue