202508251124

RoomStatusLog 加入 心跳與驗証設備是否正常
This commit is contained in:
allen.yan 2025-08-25 11:45:04 +08:00
parent 02477bbb17
commit 40fbeb6a63
2 changed files with 4 additions and 0 deletions

View File

@ -31,6 +31,8 @@ class CheckRoomOnlineStatus extends Command
if (!$latestStatus || $latestStatus->created_at < $threshold) {
$room->is_online = false;
$room->log_source='system';
$room->log_message='checkRoomOnline';
$room->save();
$this->info("Room [{$room->name}] marked as offline (no recent MachineStatus)");
}

View File

@ -163,6 +163,8 @@ class RoomControlController extends Controller
$room->internal_ip = $validated['ip'];
$room->port = 1000;
$room->is_online=1;
$room->log_source='api';
$room->log_message='session';
$room->touch(); // 更新 updated_at
$room->save();
$room->load('latestSession');