mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-16 14:00:56 +08:00
fix removeDuplicatePeer()
This commit is contained in:
@@ -481,8 +481,9 @@ class ToolRepository extends BaseRepository
|
||||
{
|
||||
$size = 2000;
|
||||
while (true) {
|
||||
$results = NexusDB::select("select torrent, peer_id, userid, group_concat(id) as ids from peers group by torrent, peer_id, userid having(count(*)) > 1 limit $size");
|
||||
$results = NexusDB::select("select torrent, userid, group_concat(id) as ids from peers group by torrent, peer_id, userid having(count(*)) > 1 limit $size");
|
||||
if (empty($results)) {
|
||||
do_log("[DELETE_DUPLICATED_PEERS], no data: ". last_query());
|
||||
break;
|
||||
}
|
||||
do_log("[DELETE_DUPLICATED_PEERS], count: " . count($results));
|
||||
|
||||
Reference in New Issue
Block a user