mirror of
https://github.com/v2board/v2board.git
synced 2025-01-11 00:29:09 +08:00
feature: server push status
This commit is contained in:
parent
cbe5882e01
commit
ff30d3dcb2
@ -40,7 +40,6 @@ class ShadowsocksTidalabController extends Controller
|
|||||||
abort(500, 'fail');
|
abort(500, 'fail');
|
||||||
}
|
}
|
||||||
Cache::put(CacheKey::get('SERVER_SHADOWSOCKS_LAST_CHECK_AT', $server->id), time(), 3600);
|
Cache::put(CacheKey::get('SERVER_SHADOWSOCKS_LAST_CHECK_AT', $server->id), time(), 3600);
|
||||||
Cache::put(CacheKey::get('SERVER_SHADOWSOCKS_LAST_PUSH_AT', $server->id), time(), 3600);
|
|
||||||
$serverService = new ServerService();
|
$serverService = new ServerService();
|
||||||
$users = $serverService->getAvailableUsers(json_decode($server->group_id));
|
$users = $serverService->getAvailableUsers(json_decode($server->group_id));
|
||||||
$result = [];
|
$result = [];
|
||||||
@ -71,6 +70,7 @@ class ShadowsocksTidalabController extends Controller
|
|||||||
$data = file_get_contents('php://input');
|
$data = file_get_contents('php://input');
|
||||||
$data = json_decode($data, true);
|
$data = json_decode($data, true);
|
||||||
Cache::put(CacheKey::get('SERVER_SHADOWSOCKS_ONLINE_USER', $server->id), count($data), 3600);
|
Cache::put(CacheKey::get('SERVER_SHADOWSOCKS_ONLINE_USER', $server->id), count($data), 3600);
|
||||||
|
Cache::put(CacheKey::get('SERVER_SHADOWSOCKS_LAST_PUSH_AT', $server->id), time(), 3600);
|
||||||
$userService = new UserService();
|
$userService = new UserService();
|
||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
try {
|
try {
|
||||||
|
@ -40,7 +40,6 @@ class TrojanTidalabController extends Controller
|
|||||||
abort(500, 'fail');
|
abort(500, 'fail');
|
||||||
}
|
}
|
||||||
Cache::put(CacheKey::get('SERVER_TROJAN_LAST_CHECK_AT', $server->id), time(), 3600);
|
Cache::put(CacheKey::get('SERVER_TROJAN_LAST_CHECK_AT', $server->id), time(), 3600);
|
||||||
Cache::put(CacheKey::get('SERVER_TROJAN_LAST_PUSH_AT', $server->id), time(), 3600);
|
|
||||||
$serverService = new ServerService();
|
$serverService = new ServerService();
|
||||||
$users = $serverService->getAvailableUsers(json_decode($server->group_id));
|
$users = $serverService->getAvailableUsers(json_decode($server->group_id));
|
||||||
$result = [];
|
$result = [];
|
||||||
@ -72,6 +71,7 @@ class TrojanTidalabController extends Controller
|
|||||||
$data = file_get_contents('php://input');
|
$data = file_get_contents('php://input');
|
||||||
$data = json_decode($data, true);
|
$data = json_decode($data, true);
|
||||||
Cache::put(CacheKey::get('SERVER_TROJAN_ONLINE_USER', $server->id), count($data), 3600);
|
Cache::put(CacheKey::get('SERVER_TROJAN_ONLINE_USER', $server->id), count($data), 3600);
|
||||||
|
Cache::put(CacheKey::get('SERVER_TROJAN_LAST_PUSH_AT', $server->id), time(), 3600);
|
||||||
$userService = new UserService();
|
$userService = new UserService();
|
||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user