HDInnovations / UNIT3D-Community-Edition

Private Torrent Tracker Built With Laravel, Livewire and AlpineJS.
GNU Affero General Public License v3.0
1.94k stars 370 forks source link

No Flush Ghost Peers Automatically #435

Closed MyAlien closed 5 years ago

MyAlien commented 5 years ago

Issue Type

End User Info

-- UNIT3D Version: 1.8.6

-- Laravel Version: 5.6.37

-- PHP Version: 7.2.10

-- Database Driver & Version: 5.7.24

-- OS Driver and Version: 18.04.1

If I do not click on Flush Ghost Peers the Seed and Leench accumulates. Use cron ?

Thank you.

HVRVKVT commented 5 years ago

afaik they automatically flush every announce

HDVinnie commented 5 years ago

This is a invalid issue. There is already a scheduled command that runs every hour. Announce interval is every 45 min. In order for a peer to be considered it must have a last_announce timestamp of 2 hours or greater aka two announce intervals.

https://github.com/HDInnovations/UNIT3D/blob/master/app/Console/Commands/FlushPeers.php

https://github.com/HDInnovations/UNIT3D/blob/38f556eb48998d8bfcbe2e9ddcdb7d7cb48830b9/app/Console/Kernel.php#L61

MyAlien commented 5 years ago

Hello, I do not understand why I have to click on it. Switch false to true ? ( https://github.com/HDInnovations/UNIT3D/blob/master/app/Console/Commands/FlushPeers.php ) History::where("info_hash", $data->hash)->where("user_id", $data->user_id)->update(['active' => false]); $data->delete(); Thx

HDVinnie commented 5 years ago

You don't have to click it. The flush peers option in staff dashboard is completely different function and only there if you want/need to force it....The command I posted above runs on a schedule automatically.

https://github.com/HDInnovations/UNIT3D/blob/c3dcaed34184883c845a1501f267c9d140546f6d/app/Http/Controllers/Staff/FlushController.php#L27