mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 05:00:49 +08:00
move cleanup: seed bonus and seeding leeching time to job
This commit is contained in:
@@ -24,19 +24,12 @@ if (isset($_SERVER['argv'][1])) {
|
||||
}
|
||||
$logPrefix = "[CLEANUP_CLI]";
|
||||
$begin = time();
|
||||
try {
|
||||
if ($force) {
|
||||
$result = docleanup(1, true);
|
||||
} else {
|
||||
$result = autoclean(true);
|
||||
}
|
||||
$log = "$logPrefix, DONE: $result, cost time in seconds: " . (time() - $begin);
|
||||
do_log($log);
|
||||
printProgress($log);
|
||||
} catch (\Exception $exception) {
|
||||
$log = "$logPrefix, ERROR: " . $exception->getMessage();
|
||||
do_log($log);
|
||||
printProgress($log);
|
||||
throw new \RuntimeException($exception->getMessage());
|
||||
if ($force) {
|
||||
$result = docleanup(1, true);
|
||||
} else {
|
||||
$result = autoclean(true);
|
||||
}
|
||||
$log = "$logPrefix, DONE: $result, cost time in seconds: " . (time() - $begin);
|
||||
do_log($log);
|
||||
printProgress($log);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user