mirror of
https://github.com/friendica/friendica
synced 2024-11-10 06:22:53 +00:00
Changed worker order
This commit is contained in:
parent
a228183abb
commit
c740509a22
3 changed files with 6 additions and 7 deletions
|
@ -108,7 +108,7 @@ class Cron
|
|||
|
||||
Worker::add(PRIORITY_LOW, 'UpdatePhotoAlbums');
|
||||
|
||||
Worker::add(PRIORITY_LOW, 'Expire');
|
||||
Worker::add(PRIORITY_LOW, 'ExpirePosts');
|
||||
|
||||
Worker::add(PRIORITY_LOW, 'ExpireConversations');
|
||||
|
||||
|
|
|
@ -76,8 +76,6 @@ class Expire
|
|||
|
||||
Logger::notice('calling hooks done');
|
||||
|
||||
Worker::add(['priority' => $a->queue['priority'], 'dont_fork' => true], 'ExpirePosts');
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,16 +38,17 @@ class ExpirePosts
|
|||
*/
|
||||
public static function execute()
|
||||
{
|
||||
$a = DI::app();
|
||||
|
||||
self::deleteExpiredOriginPosts();
|
||||
|
||||
self::deleteUnusedItemUri();
|
||||
|
||||
self::deleteExpiredExternalPosts();
|
||||
|
||||
// Set the expiry for origin posta
|
||||
Worker::add(PRIORITY_LOW, 'Expire');
|
||||
|
||||
// update nodeinfo data after everything is cleaned up
|
||||
Worker::add(['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true], 'NodeInfo');
|
||||
Worker::add(PRIORITY_LOW, 'NodeInfo');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -70,7 +71,7 @@ class ExpirePosts
|
|||
}
|
||||
DBA::close($rows);
|
||||
|
||||
Logger::info('Deleting orphaned post entries- start');
|
||||
Logger::info('Deleting orphaned post entries - start');
|
||||
$condition = ["NOT EXISTS (SELECT `uri-id` FROM `post-user` WHERE `post-user`.`uri-id` = `post`.`uri-id`)"];
|
||||
DBA::delete('post', $condition);
|
||||
Logger::info('Orphaned post entries deleted', ['rows' => DBA::affectedRows()]);
|
||||
|
|
Loading…
Reference in a new issue