[FEAT] 優化機台重啟狀態處理邏輯

1. 在 ProcessStatus Job 中新增對 restarting 狀態的判斷。
2. 若機台處於計畫性重啟狀態,則不寫入狀態變更日誌,避免後台誤報。
This commit is contained in:
sky121113 2026-05-11 14:15:26 +08:00
parent ce09120483
commit ee47f65523

View File

@ -56,6 +56,12 @@ class ProcessStatus implements ShouldQueue
$machine->update($updateData);
// 若是計畫性重啟狀態,靜默處理,不寫 log避免管理後台誤報
if ($status === 'restarting') {
Log::info("ProcessStatus: Machine [{$machine->serial_no}] is restarting (planned), suppressing log.");
return;
}
// If status changed, log it
if ($oldStatus !== $status) {
$level = ($status === 'offline') ? 'warning' : 'info';