mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-03 10:30:51 +08:00
perf: 优化用户流量消费队列(上万用户流量信息数秒即可处理完成
This commit is contained in:
@@ -89,12 +89,8 @@ class UniProxyController extends Controller
|
||||
$online_user = $onlineCollection->sum('online_user');
|
||||
Cache::put(CacheKey::get('SERVER_' . strtoupper($this->nodeType) . '_ONLINE_USER', $this->nodeInfo->id), $online_user, 3600);
|
||||
Cache::put(CacheKey::get('SERVER_' . strtoupper($this->nodeType) . '_LAST_PUSH_AT', $this->nodeInfo->id), time(), 3600);
|
||||
|
||||
// 查询是否存在子节点
|
||||
$childServer = null;
|
||||
if ($this->nodeInfo->parent_id == null) $childServer = $this->serverService->getChildServer($this->nodeId, $this->nodeType, $ip);
|
||||
$userService = new UserService();
|
||||
$userService->trafficFetch($this->nodeInfo->toArray(), $this->nodeType, $data, $childServer ? $childServer->toArray() : null);
|
||||
$userService->trafficFetch($this->nodeInfo->toArray(), $this->nodeType, $data , $ip);
|
||||
|
||||
return response([
|
||||
'data' => true
|
||||
|
||||
Reference in New Issue
Block a user