refactor(online-status): consolidate updates and add cleanup command

This commit is contained in:
xboard
2025-09-15 20:32:22 +08:00
parent cd8a8ecf58
commit 843c5af4c2
5 changed files with 163 additions and 74 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Http\Controllers\V1\Server;
use App\Http\Controllers\Controller;
use App\Jobs\UpdateAliveDataJob;
use App\Services\ServerService;
use App\Services\UserService;
use App\Utils\CacheKey;
@@ -216,7 +217,7 @@ class UniProxyController extends Controller
'error' => 'Invalid online data'
], 400);
}
$this->userOnlineService->updateAliveData($data, $node->type, $node->id);
UpdateAliveDataJob::dispatch($data, $node->type, $node->id);
return response()->json(['data' => true]);
}