diff options
author | zottel <github@zottel.net> | 2012-03-19 09:34:39 +0100 |
---|---|---|
committer | zottel <github@zottel.net> | 2012-03-19 09:34:39 +0100 |
commit | 6d31e3d6ef56e22ecedccaeb6846b52da501097b (patch) | |
tree | 86518b59c0318d8057a1a8503c6354ebaa96dae3 /include/queue.php | |
parent | df78c9be0bab909dfa8cf196f7aaa4ea3423be8c (diff) | |
parent | 283bc51acf479eebd54145eb639c681980f6717b (diff) | |
download | volse-hubzilla-6d31e3d6ef56e22ecedccaeb6846b52da501097b.tar.gz volse-hubzilla-6d31e3d6ef56e22ecedccaeb6846b52da501097b.tar.bz2 volse-hubzilla-6d31e3d6ef56e22ecedccaeb6846b52da501097b.zip |
Merge remote branch 'upstream/master'
Diffstat (limited to 'include/queue.php')
-rwxr-xr-x | include/queue.php | 11 |
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; } |