mirror of
https://github.com/friendica/friendica
synced 2025-04-25 01:50:11 +00:00
Continued with coding convention:
- added curly braces around conditional code blocks - added space between if/foreach/... and brace - rewrote a code block so if dbm::is_result() fails it will abort, else the id is fetched from INSERT statement - made some SQL keywords upper-cased and added back-ticks to columns/table names Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
parent
de689583e2
commit
6c0c9d542a
18 changed files with 82 additions and 67 deletions
|
@ -58,20 +58,21 @@ function queue_run(&$argv, &$argc){
|
|||
$interval = false;
|
||||
|
||||
$r = q("select * from deliverq where 1");
|
||||
if($r) {
|
||||
foreach($r as $rr) {
|
||||
if ($r) {
|
||||
foreach ($r as $rr) {
|
||||
logger('queue: deliverq');
|
||||
proc_run(PRIORITY_HIGH,'include/delivery.php',$rr['cmd'],$rr['item'],$rr['contact']);
|
||||
if($interval)
|
||||
@time_sleep_until(microtime(true) + (float) $interval);
|
||||
if($interval) {
|
||||
time_sleep_until(microtime(true) + (float) $interval);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$r = q("SELECT `queue`.*, `contact`.`name`, `contact`.`uid` FROM `queue`
|
||||
INNER JOIN `contact` ON `queue`.`cid` = `contact`.`id`
|
||||
WHERE `queue`.`created` < UTC_TIMESTAMP() - INTERVAL 3 DAY");
|
||||
if($r) {
|
||||
foreach($r as $rr) {
|
||||
if ($r) {
|
||||
foreach ($r as $rr) {
|
||||
logger('Removing expired queue item for ' . $rr['name'] . ', uid=' . $rr['uid']);
|
||||
logger('Expired queue data :' . $rr['content'], LOGGER_DATA);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue