feat: DWH connectivity probe at startup — modal alert within 5s if unreachable
Backend: GET /health/dwh (unauthenticated) calls tht db ping with a 5s timeout. Frontend: checkDwhHealth() races a 5s timer against the fetch; on failure a non-dismissable Dialog with Retry appears immediately. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -154,7 +154,7 @@ export class ThtRunner {
|
||||
* cleanly. Timed out to keep POST /sessions responsive when the host hangs.
|
||||
*/
|
||||
async dbPing(workspace?: string): Promise<{ ok: boolean; detail: string }> {
|
||||
const { code, stdout, stderr } = await this.run(["db", "ping"], workspace, 10_000);
|
||||
const { code, stdout, stderr } = await this.run(["db", "ping"], workspace, 5_000);
|
||||
if (code === 0) return { ok: true, detail: stdout.trim() };
|
||||
return { ok: false, detail: (stderr || stdout).trim() };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user