Newer
Older
TelosDB / .scripts / run_and_check.ps1
@楽曲作りまくりおじさん 楽曲作りまくりおじさん 8 hours ago 707 bytes chore: prepare for history rewrite
# Start telos-db, run health checks, show tail of log, then stop
Param()
Set-Location $PSScriptRoot.Replace('\.scripts','')
if (-not (Test-Path 'logs')) { New-Item -ItemType Directory -Path 'logs' | Out-Null }
$proc = Start-Process -FilePath .\target\debug\telos-db.exe -ArgumentList '--n_ctx','2048','--cache-ram','0' -RedirectStandardOutput .\logs\start.log -RedirectStandardError .\logs\start.err -NoNewWindow -PassThru
Start-Sleep -Seconds 6
& .\.scripts\health_check.ps1
Start-Sleep -Seconds 1
Write-Host "--- Recent startup log ---"
Get-Content .\logs\start.log -Tail 200 | ForEach-Object { Write-Host $_ }
try { Stop-Process -Id $proc.Id -Force } catch { Write-Warning "Failed to stop process: $_" }