[FEAT] 優化機台重啟狀態處理邏輯
1. 在 ProcessStatus Job 中新增對 restarting 狀態的判斷。 2. 若機台處於計畫性重啟狀態,則不寫入狀態變更日誌,避免後台誤報。
This commit is contained in:
parent
ce09120483
commit
ee47f65523
@ -56,6 +56,12 @@ class ProcessStatus implements ShouldQueue
|
|||||||
|
|
||||||
$machine->update($updateData);
|
$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 status changed, log it
|
||||||
if ($oldStatus !== $status) {
|
if ($oldStatus !== $status) {
|
||||||
$level = ($status === 'offline') ? 'warning' : 'info';
|
$level = ($status === 'offline') ? 'warning' : 'info';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user