diff options
author | tony baldwin <tonybaldwin@gmx.com> | 2012-03-21 01:36:23 -0400 |
---|---|---|
committer | tony baldwin <tonybaldwin@gmx.com> | 2012-03-21 01:36:23 -0400 |
commit | e5c29fcc786cee73c08247824cb87e9ed65a2c36 (patch) | |
tree | 1e5a6fcf5ba20e5effdd60e6d6ffa5fadb11d9d7 /include/queue.php | |
parent | cf17606d0f6200296b1e6d67f9ae3fb797e0df69 (diff) | |
parent | b4a2dae0850ed72b61b008e44efa98f300ccd640 (diff) | |
download | volse-hubzilla-e5c29fcc786cee73c08247824cb87e9ed65a2c36.tar.gz volse-hubzilla-e5c29fcc786cee73c08247824cb87e9ed65a2c36.tar.bz2 volse-hubzilla-e5c29fcc786cee73c08247824cb87e9ed65a2c36.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; } |