load pieces hash return total and success

This commit is contained in:
xiaomlove
2023-07-31 01:20:32 +08:00
parent b9118ae8f6
commit 565c0f15bc
2 changed files with 12 additions and 10 deletions

View File

@@ -32,8 +32,8 @@ class TorrentLoadPiecesHash extends Command
$id = $this->option('id');
$rep = new TorrentRepository();
$this->info("id: $id, going to load pieces hash...");
$total = $rep->loadPiecesHashCache($id);
$this->info(sprintf("%s, total: %s, cost time: %s seconds.", nexus()->getRequestId(), $total, time() - $begin));
$result = $rep->loadPiecesHashCache($id);
$this->info(sprintf("%s, result: %s, cost time: %s seconds.", nexus()->getRequestId(), json_encode($result), time() - $begin));
return Command::SUCCESS;
}
}