aboutsummaryrefslogtreecommitdiffstats
path: root/include/queue.php
diff options
context:
space:
mode:
authorTobias Diekershoff <tobias.diekershoff@gmx.net>2012-03-18 07:19:20 +0100
committerTobias Diekershoff <tobias.diekershoff@gmx.net>2012-03-18 07:19:20 +0100
commit751e4181e5e875b9f9850700a3687774e4c53ab3 (patch)
tree87fd3a12a95ceb9aaa696e9968664a272d27799b /include/queue.php
parent5fd03583a4f5d8bf0964c7881cbf7a8891513587 (diff)
parent4bb280bc2f7068f0c1199e9f8119e25278aa3bcb (diff)
downloadvolse-hubzilla-751e4181e5e875b9f9850700a3687774e4c53ab3.tar.gz
volse-hubzilla-751e4181e5e875b9f9850700a3687774e4c53ab3.tar.bz2
volse-hubzilla-751e4181e5e875b9f9850700a3687774e4c53ab3.zip
Merge branch 'master' of https://github.com/friendica/friendica
Diffstat (limited to 'include/queue.php')
-rwxr-xr-xinclude/queue.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/queue.php b/include/queue.php
index d312b50f5..7e92705be 100755
--- a/include/queue.php
+++ b/include/queue.php
@@ -61,13 +61,18 @@ function queue_run($argv, $argc){
q("DELETE FROM `queue` WHERE `created` < UTC_TIMESTAMP() - INTERVAL 3 DAY");
}
- if($queue_id)
+ if($queue_id) {
$r = q("SELECT `id` FROM `queue` WHERE `id` = %d LIMIT 1",
intval($queue_id)
);
- else
- $r = q("SELECT `id` FROM `queue` WHERE `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE ");
+ }
+ else {
+ // For the first 12 hours we'll try to deliver every 15 minutes
+ // After that, we'll only attempt delivery once per hour.
+
+ $r = q("SELECT `id` FROM `queue` WHERE (( `created` > UTC_TIMESTAMP() - INTERVAL 12 HOUR && `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE ) OR ( `last` < UTC_TIMESTAMP() - INTERVAL 1 HOUR ))");
+ }
if(! count($r)){
return;
}