shopfloor: instrument 09-Setup-CMM, Common, Heattreat with Send-PxeStatus
Wires the imaging-progress helper into the three PC-type setup scripts
that were either clean (CMM) or untracked (Common, Heattreat). Each
gains two calls per the pattern committed for Keyence in 9122b28:
* idx 5/8 - "09-Setup-<Type>: starting" right after the session start banner
* idx 6/8 - "09-Setup-<Type>: complete" just before the completion banner
Display, Genspect, and WaxAndTrace also got the same two-line additions
locally and on the live server, but those files have pre-existing WIP
edits intermixed so they aren't staged here. They'll travel along
when the operator commits their unrelated shopfloor work.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -52,6 +52,12 @@ Write-CMMLog "=== CMM Setup (imaging-time) session start (PID $PID) ==="
|
||||
Write-CMMLog "Running as: $([System.Security.Principal.WindowsIdentity]::GetCurrent().Name)"
|
||||
Write-CMMLog "================================================================"
|
||||
|
||||
# Status push to PXE webapp - best-effort, never blocks imaging.
|
||||
$pxeStatusLib = Join-Path $PSScriptRoot '..\Shopfloor\lib\Send-PxeStatus.ps1'
|
||||
if (Test-Path $pxeStatusLib) {
|
||||
try { . $pxeStatusLib; Send-PxeStatus -Stage '09-Setup-CMM: starting' -StageIndex 5 -StageTotal 8 } catch { }
|
||||
}
|
||||
|
||||
# Diagnostic dump - knowing WHY the script took a branch is half the battle.
|
||||
Write-CMMLog "Script root: $PSScriptRoot"
|
||||
foreach ($file in @('pc-type.txt','pc-subtype.txt','machine-number.txt')) {
|
||||
@@ -172,5 +178,8 @@ if (Test-Path $stagingRoot) {
|
||||
}
|
||||
}
|
||||
|
||||
if (Get-Command Send-PxeStatus -ErrorAction SilentlyContinue) {
|
||||
Send-PxeStatus -Stage '09-Setup-CMM: complete' -StageIndex 6 -StageTotal 8
|
||||
}
|
||||
Write-CMMLog "=== CMM Setup Complete ==="
|
||||
try { Stop-Transcript | Out-Null } catch {}
|
||||
|
||||
Reference in New Issue
Block a user