mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-22 02:47:27 +08:00
MeiliSearch + Peers&Snatched table swip
This commit is contained in:
@@ -350,6 +350,7 @@ function docleanup($forceAll = 0, $printProgress = false) {
|
||||
if ($printProgress) {
|
||||
printProgress($log);
|
||||
}
|
||||
|
||||
//Priority Class 3: cleanup every 60 mins
|
||||
$res = sql_query("SELECT value_u FROM avps WHERE arg = 'lastcleantime3'");
|
||||
$row = mysql_fetch_array($res);
|
||||
@@ -547,6 +548,18 @@ 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'");
|
||||
$row = mysql_fetch_array($res);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.0');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-03-28');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-04-06');
|
||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||
|
||||
@@ -3128,6 +3128,8 @@ function deletetorrent($id, $notify = false) {
|
||||
'comment' => '',
|
||||
], $notify);
|
||||
}
|
||||
$meiliSearchRep = new \App\Repositories\MeiliSearchRepository();
|
||||
$meiliSearchRep->deleteDocuments($idArr);
|
||||
}
|
||||
|
||||
function pager($rpp, $count, $href, $opts = array(), $pagename = "page") {
|
||||
|
||||
Reference in New Issue
Block a user