peer to json exclude peer_id

This commit is contained in:
xiaomlove
2022-04-08 16:28:00 +08:00
parent d0449935d8
commit 9445ef98ac
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -446,7 +446,8 @@ class TrackerRepository extends BaseRepository
}
$duration = Carbon::now()->diffInSeconds($peer->last_action);
$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;
$tenMB = 1024 * 1024 * 10;
$nowStr = Carbon::now()->toDateTimeString();
+1 -1
View File
@@ -128,7 +128,7 @@ class Install
public function listRequirementTableRows()
{
$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[] = [
'label' => 'PHP version',