mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-05-18 06:37:28 +08:00
peer to json exclude peer_id
This commit is contained in:
@@ -446,7 +446,8 @@ class TrackerRepository extends BaseRepository
|
|||||||
}
|
}
|
||||||
$duration = Carbon::now()->diffInSeconds($peer->last_action);
|
$duration = Carbon::now()->diffInSeconds($peer->last_action);
|
||||||
$upSpeed = $dataTraffic['uploaded_increment'] > 0 ? ($dataTraffic['uploaded_increment'] / $duration) : 0;
|
$upSpeed = $dataTraffic['uploaded_increment'] > 0 ? ($dataTraffic['uploaded_increment'] / $duration) : 0;
|
||||||
do_log("peer: " . $peer->toJson() . ", upSpeed: $upSpeed, dataTraffic: " . json_encode($dataTraffic));
|
$peerInfo = Arr::except($peer->toArray(), ['peer_id']);
|
||||||
|
do_log("peerInfo: " . json_encode($peerInfo) . ", upSpeed: $upSpeed, dataTraffic: " . json_encode($dataTraffic));
|
||||||
$oneGB = 1024 * 1024 * 1024;
|
$oneGB = 1024 * 1024 * 1024;
|
||||||
$tenMB = 1024 * 1024 * 10;
|
$tenMB = 1024 * 1024 * 10;
|
||||||
$nowStr = Carbon::now()->toDateTimeString();
|
$nowStr = Carbon::now()->toDateTimeString();
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ class Install
|
|||||||
public function listRequirementTableRows()
|
public function listRequirementTableRows()
|
||||||
{
|
{
|
||||||
$gdInfo = function_exists('gd_info') ? gd_info() : [];
|
$gdInfo = function_exists('gd_info') ? gd_info() : [];
|
||||||
$extensions = ['ctype', 'fileinfo', 'json', 'mbstring', 'openssl', 'pdo_mysql', 'tokenizer', 'xml', 'mysqli', 'bcmath', 'redis', 'gd', 'pcntl', 'sockets'];
|
$extensions = ['ctype', 'fileinfo', 'json', 'mbstring', 'openssl', 'pdo_mysql', 'tokenizer', 'xml', 'mysqli', 'bcmath', 'redis', 'gd', 'pcntl', 'sockets', 'posix'];
|
||||||
$tableRows = [];
|
$tableRows = [];
|
||||||
$tableRows[] = [
|
$tableRows[] = [
|
||||||
'label' => 'PHP version',
|
'label' => 'PHP version',
|
||||||
|
|||||||
Reference in New Issue
Block a user