mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 20:17:24 +08:00
clean: update exam progress after update total seeding/leeching time
This commit is contained in:
+9
-8
@@ -298,14 +298,6 @@ function docleanup($forceAll = 0, $printProgress = false) {
|
|||||||
printProgress($log);
|
printProgress($log);
|
||||||
}
|
}
|
||||||
|
|
||||||
$examRep = new \App\Repositories\ExamRepository();
|
|
||||||
$updateExamProgressResult = $examRep->updateProgressBulk();
|
|
||||||
$log = 'update exam progress';
|
|
||||||
do_log($log . ", result: " . json_encode($updateExamProgressResult));
|
|
||||||
if ($printProgress) {
|
|
||||||
printProgress($log);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Priority Class 2: cleanup every 30 mins
|
//Priority Class 2: cleanup every 30 mins
|
||||||
$res = sql_query("SELECT value_u FROM avps WHERE arg = 'lastcleantime2'");
|
$res = sql_query("SELECT value_u FROM avps WHERE arg = 'lastcleantime2'");
|
||||||
$row = mysql_fetch_array($res);
|
$row = mysql_fetch_array($res);
|
||||||
@@ -786,6 +778,15 @@ function docleanup($forceAll = 0, $printProgress = false) {
|
|||||||
printProgress($log);
|
printProgress($log);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//update exam progress
|
||||||
|
$examRep = new \App\Repositories\ExamRepository();
|
||||||
|
$updateExamProgressResult = $examRep->updateProgressBulk();
|
||||||
|
$log = 'update exam progress';
|
||||||
|
do_log($log . ", result: " . json_encode($updateExamProgressResult));
|
||||||
|
if ($printProgress) {
|
||||||
|
printProgress($log);
|
||||||
|
}
|
||||||
|
|
||||||
// delete torrents that have been dead for a long time
|
// delete torrents that have been dead for a long time
|
||||||
if ($deldeadtorrent_torrent > 0){
|
if ($deldeadtorrent_torrent > 0){
|
||||||
$length = $deldeadtorrent_torrent*86400;
|
$length = $deldeadtorrent_torrent*86400;
|
||||||
|
|||||||
Reference in New Issue
Block a user