Changed worker order

pull/9976/head
Michael 2021-03-02 07:06:22 +00:00
rodzic a228183abb
commit c740509a22
3 zmienionych plików z 6 dodań i 7 usunięć

Wyświetl plik

@ -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');

Wyświetl plik

@ -76,8 +76,6 @@ class Expire
Logger::notice('calling hooks done');
Worker::add(['priority' => $a->queue['priority'], 'dont_fork' => true], 'ExpirePosts');
return;
}
}

Wyświetl plik

@ -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()]);