mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 04:20:49 +08:00
Lower the priority of the full volume synchronization meilisearch
This commit is contained in:
@@ -558,17 +558,6 @@ function docleanup($forceAll = 0, $printProgress = false) {
|
||||
printProgress($log);
|
||||
}
|
||||
|
||||
//sync to Meilisearch
|
||||
$meiliRep = new \App\Repositories\MeiliSearchRepository();
|
||||
if ($meiliRep->isEnabled()) {
|
||||
$meiliRep->import();
|
||||
}
|
||||
$log = "sync to Meilisearch";
|
||||
do_log($log);
|
||||
if ($printProgress) {
|
||||
printProgress($log);
|
||||
}
|
||||
|
||||
|
||||
//Priority Class 4: cleanup every 24 hours
|
||||
$res = sql_query("SELECT value_u FROM avps WHERE arg = 'lastcleantime4'");
|
||||
@@ -969,25 +958,16 @@ function docleanup($forceAll = 0, $printProgress = false) {
|
||||
printProgress($log);
|
||||
}
|
||||
|
||||
//delete duplicated snatched
|
||||
//is it necessary ? duplicate snatch update by torrent_id + userid, all records key fields are the same
|
||||
// $snatchRes = sql_query('select userid, torrentid, group_concat(id) as ids from snatched group by userid, torrentid having(count(*)) > 1');
|
||||
// while ($snatchRow = mysql_fetch_assoc($snatchRes)) {
|
||||
// $torrentId = $snatchRow['torrentid'];
|
||||
// $userId = $snatchRow['userid'];
|
||||
// $idArr = explode(',', $snatchRow['ids']);
|
||||
// sort($idArr, SORT_NUMERIC);
|
||||
// $remainId = array_pop($idArr);
|
||||
// $delIdStr = implode(',', $idArr);
|
||||
// do_log("[DELETE_DUPLICATED_SNATCH], torrent: $torrentId, user: $userId, snatchIdStr: $delIdStr");
|
||||
// sql_query("delete from snatched where id in ($delIdStr)");
|
||||
// sql_query("update claims set snatched_id = $remainId where torrent_id = $torrentId and uid = $userId");
|
||||
// }
|
||||
// $log = "delete duplicated snatched";
|
||||
// do_log($log);
|
||||
// if ($printProgress) {
|
||||
// printProgress($log);
|
||||
// }
|
||||
//sync to Meilisearch
|
||||
$meiliRep = new \App\Repositories\MeiliSearchRepository();
|
||||
if ($meiliRep->isEnabled()) {
|
||||
$meiliRep->import();
|
||||
}
|
||||
$log = "sync to Meilisearch";
|
||||
do_log($log);
|
||||
if ($printProgress) {
|
||||
printProgress($log);
|
||||
}
|
||||
|
||||
//Priority Class 5: cleanup every 15 days
|
||||
$res = sql_query("SELECT value_u FROM avps WHERE arg = 'lastcleantime5'");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.3');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-05-13');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-05-14');
|
||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||
|
||||
Reference in New Issue
Block a user