Desktop Self-hosted guidance improvements (#5060)

Removed timeout when waiting for backend port to allow for slow backend
spinups



<img width="1185" height="951" alt="image"
src="https://github.com/user-attachments/assets/badaf8e5-611d-44aa-aca2-7c1c906c2019"
/>
<img width="1213" height="1533" alt="image"
src="https://github.com/user-attachments/assets/ce78b67a-07e0-4c23-9087-5de0c5f203c6"
/>
<img width="1207" height="1202" alt="image"
src="https://github.com/user-attachments/assets/c6e5b4c5-9cc3-4973-a634-3b7aa1e1dd34"
/>
This commit is contained in:
ConnorYoh
2025-11-28 15:55:37 +00:00
committed by GitHub
parent 731743b618
commit 250979e271
6 changed files with 59 additions and 10 deletions
@@ -101,8 +101,8 @@ export class TauriBackendService {
return this.startPromise;
}
private async waitForPort(maxAttempts = 30): Promise<void> {
for (let i = 0; i < maxAttempts; i++) {
private async waitForPort(): Promise<void> {
while (true) {
try {
const port = await invoke<number | null>('get_backend_port');
if (port) {
@@ -114,7 +114,6 @@ export class TauriBackendService {
}
await new Promise(resolve => setTimeout(resolve, 500));
}
throw new Error('Failed to detect backend port after 15 seconds');
}
/**
@@ -208,16 +207,14 @@ export class TauriBackendService {
}
}
private async waitForHealthy(maxAttempts = 60): Promise<void> {
for (let i = 0; i < maxAttempts; i++) {
private async waitForHealthy(): Promise<void> {
while (true) {
const isHealthy = await this.checkBackendHealth();
if (isHealthy) {
return;
}
await new Promise(resolve => setTimeout(resolve, 1000));
}
this.setStatus('unhealthy');
throw new Error('Backend failed to become healthy after 60 seconds');
}
/**