If a contact has had delivery issues in the last 15 minutes, send new posts straight to the queue
and don't even try to connect. Also defer polling for stuck contacts. Should reduce the number of stuck processes trying to connect with dead or dying servers significantly.
This commit is contained in:
@@ -15,6 +15,15 @@ function remove_queue_item($id) {
|
||||
);
|
||||
}
|
||||
|
||||
function was_recently_delayed($cid) {
|
||||
|
||||
$r = q("SELECT `id` FROM `queue` WHERE `cid` = %d
|
||||
and last > UTC_TIMESTAMP() - interval 15 minute limit 1",
|
||||
intval($cid)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function add_to_queue($cid,$network,$msg,$batch = false) {
|
||||
|
||||
|
Reference in New Issue
Block a user