mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-03 18:40:52 +08:00
perf: 优化流量消费相关代码性能,解决流量纪录与已用流量有概率不一致的问题
This commit is contained in:
@@ -35,11 +35,9 @@ class UniProxyController extends Controller
|
||||
public function push(Request $request)
|
||||
{
|
||||
$res = json_decode(get_request_content(), true);
|
||||
$data = Validator::make($res, [
|
||||
'*.0' => 'integer',
|
||||
'*.1' => 'integer',
|
||||
])->validate();
|
||||
|
||||
$data = array_filter($res, function ($item) {
|
||||
return is_array($item) && count($item) === 2 && is_numeric($item[0]) && is_numeric($item[1]);
|
||||
});
|
||||
$nodeType = $request->input('node_type');
|
||||
$nodeId = $request->input('node_id');
|
||||
// 增加单节点多服务器统计在线人数
|
||||
|
||||
Reference in New Issue
Block a user