mirror of
https://github.com/friendica/friendica
synced 2025-04-25 11:10:11 +00:00
Some small performance tweaks
This commit is contained in:
parent
a1ee75eba7
commit
bb222209bc
4 changed files with 26 additions and 9 deletions
|
@ -170,7 +170,7 @@ class ExpirePosts
|
|||
{
|
||||
// We have to avoid deleting newly created "item-uri" entries.
|
||||
// So we fetch a post that had been stored yesterday and only delete older ones.
|
||||
$item = Post::selectFirst(['uri-id'], ["`uid` = ? AND `received` < UTC_TIMESTAMP() - INTERVAL ? DAY", 0, 1],
|
||||
$item = Post::selectFirstThread(['uri-id'], ["`uid` = ? AND `received` < UTC_TIMESTAMP() - INTERVAL ? DAY", 0, 1],
|
||||
['order' => ['received' => true]]);
|
||||
if (empty($item['uri-id'])) {
|
||||
Logger::warning('No item with uri-id found - we better quit here');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue