From 0fd35c836458aec4f847862bf993216d54395cda Mon Sep 17 00:00:00 2001 From: koehr Date: Fri, 26 Jan 2024 23:18:31 +0100 Subject: [PATCH] finally fix the metrics urls --- analyser/metrics.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/analyser/metrics.ts b/analyser/metrics.ts index 6bee4902..2cf7fc9e 100644 --- a/analyser/metrics.ts +++ b/analyser/metrics.ts @@ -1,9 +1,8 @@ import { retryFetch } from "./toolkit.ts"; -const STATUS_URL = "http://ylt:8383/api/runs/"; -const RESULT_URL = "http://ylt:8383/api/results/"; -// const STATUS_URL = "http://localhost:8383/api/runs/"; -// const RESULT_URL = "http://localhost:8383/api/results/"; +const HOST = Deno.env.get("CI") ? "http://ylt:8383" : "http://localhost:8383"; +const STATUS_URL = `${HOST}/api/runs/`; +const RESULT_URL = `${HOST}/api/results/`; const METRIC_DEFAULTS = { device: "desktop", waitForResponse: false,