sync: Dataforth sync fixes, TestDataDB stability, and client scripts
Dataforth DOS: - TestDataDB: singleton DB connection fix (crash prevention), WAL mode, WinSW service config, backup script, uncaught exception handlers - Sync-FromNAS.ps1: Get-NASFileList temp file approach to avoid SSH stdout deadlock, *> $null output suppression, 8.3 filename filter for PUSH phase, backslash-escaped SCP paths, rename-to-.synced - import.js: INSERT OR REPLACE for re-tested devices - Full import run: 1,028,275 -> 1,632,793 records, indexes added - Deploy script for sync fixes to AD2 Client scripts (temp/): - BG Builders: Lesley account check, MFA phone update - Lonestar Electrical: Kyla/Russ Google Workspace setup, 2FA bypass - AD2 diagnostics and NAS connectivity tests PENDING: Investigate why newest test_date is Jan 19 despite daily tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
19
temp/test-ad2-web.ps1
Normal file
19
temp/test-ad2-web.ps1
Normal file
@@ -0,0 +1,19 @@
|
||||
$SshExe = 'C:\Windows\System32\OpenSSH\ssh.exe'
|
||||
$SshTarget = 'INTRANET\sysadmin@192.168.0.6'
|
||||
|
||||
# Create a test script on AD2
|
||||
$testScript = @'
|
||||
try {
|
||||
$r = Invoke-WebRequest -Uri "http://localhost:3000/api/stats" -UseBasicParsing -TimeoutSec 5
|
||||
Write-Output "STATUS: $($r.StatusCode)"
|
||||
Write-Output "CONTENT: $($r.Content.Substring(0, [Math]::Min(200, $r.Content.Length)))"
|
||||
} catch {
|
||||
Write-Output "ERROR: $($_.Exception.Message)"
|
||||
}
|
||||
'@
|
||||
|
||||
# Write test script to AD2
|
||||
$testScript | & $SshExe $SshTarget 'powershell -Command "Set-Content -Path C:\Shares\testdatadb\test-web.ps1 -Value (Get-Content -Raw -Path -)"'
|
||||
|
||||
# Actually, simpler - just run inline
|
||||
& $SshExe $SshTarget 'powershell -NoProfile -ExecutionPolicy Bypass -Command "try { $r = Invoke-WebRequest -Uri http://localhost:3000/ -UseBasicParsing -TimeoutSec 5; Write-Output STATUS:$($r.StatusCode) } catch { Write-Output ERROR:$($_.Exception.Message) }"'
|
||||
Reference in New Issue
Block a user