feat: 增强搜索详情与索引稳定性
This commit is contained in:
+12
-3
@@ -53,14 +53,23 @@ echo.
|
||||
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
|
||||
"$backend = $null; $web = $null;" ^
|
||||
"function Stop-Tree($process) {" ^
|
||||
" if ($null -ne $process) {" ^
|
||||
" $process.Refresh();" ^
|
||||
" if (-not $process.HasExited) { Start-Process -FilePath 'taskkill.exe' -ArgumentList @('/PID', [string]$process.Id, '/T', '/F') -NoNewWindow -Wait | Out-Null }" ^
|
||||
" }" ^
|
||||
"}" ^
|
||||
"try {" ^
|
||||
" $backend = Start-Process -FilePath 'cargo' -ArgumentList @('run','-p','dht-search','--','--config','dht-search.example.toml') -WorkingDirectory $env:PROJECT_ROOT -NoNewWindow -PassThru;" ^
|
||||
" $web = Start-Process -FilePath 'bun' -ArgumentList @('run','dev','--','--host','127.0.0.1') -WorkingDirectory $env:WEB_DIR -NoNewWindow -PassThru;" ^
|
||||
" $web = Start-Process -FilePath 'bun' -ArgumentList @('--bun','run','dev','--','--host','127.0.0.1') -WorkingDirectory $env:WEB_DIR -NoNewWindow -PassThru;" ^
|
||||
" while (-not $backend.HasExited -and -not $web.HasExited) { Start-Sleep -Milliseconds 250 }" ^
|
||||
"} finally {" ^
|
||||
" foreach ($process in @($backend, $web)) {" ^
|
||||
" if ($null -ne $process -and -not $process.HasExited) { Stop-Process -Id $process.Id }" ^
|
||||
" for ($i = 0; $i -lt 20; $i++) {" ^
|
||||
" if (($null -eq $backend -or $backend.HasExited) -and ($null -eq $web -or $web.HasExited)) { break }" ^
|
||||
" Start-Sleep -Milliseconds 250" ^
|
||||
" }" ^
|
||||
" Stop-Tree $backend;" ^
|
||||
" Stop-Tree $web;" ^
|
||||
"}"
|
||||
|
||||
endlocal
|
||||
|
||||
Reference in New Issue
Block a user