mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 01:24:27 +02:00
More transactions, more queries on uncommitted data
This commit is contained in:
parent
47b8975bb6
commit
8cab3b5592
6 changed files with 67 additions and 29 deletions
|
@ -134,6 +134,8 @@ function cron_run(&$argv, &$argc){
|
|||
} else {
|
||||
proc_run(PRIORITY_LOW, 'include/dbclean.php');
|
||||
}
|
||||
|
||||
cron_update_photo_albums();
|
||||
}
|
||||
|
||||
// Clear cache entries
|
||||
|
@ -155,6 +157,19 @@ function cron_run(&$argv, &$argc){
|
|||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Update the cached values for the number of photo albums per user
|
||||
*/
|
||||
function cron_update_photo_albums() {
|
||||
$r = q("SELECT `uid` FROM `user` WHERE NOT `account_expired` AND NOT `account_removed`");
|
||||
if (!dbm::is_result($r))
|
||||
return;
|
||||
|
||||
foreach ($r AS $user) {
|
||||
photo_albums($user['uid'], true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Expire and remove user entries
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue