aboutsummaryrefslogtreecommitdiffstats
path: root/include/queue.php
diff options
context:
space:
mode:
authorMichael Vogel <icarus@dabo.de>2012-03-28 19:52:30 +0200
committerMichael Vogel <icarus@dabo.de>2012-03-28 19:52:30 +0200
commitbdd275474044152a5d9a33ea6b8a8071b931d27e (patch)
treeb10c2b68e0236925992449786d70f45aaca21984 /include/queue.php
parent792edfe9c834e3daeae598727e4cb15dc0ff8475 (diff)
parente894775a39920edc0e438364c818357ab809bace (diff)
downloadvolse-hubzilla-bdd275474044152a5d9a33ea6b8a8071b931d27e.tar.gz
volse-hubzilla-bdd275474044152a5d9a33ea6b8a8071b931d27e.tar.bz2
volse-hubzilla-bdd275474044152a5d9a33ea6b8a8071b931d27e.zip
Merge commit 'upstream/master'
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;
}