Openstatus www.openstatus.dev

๐Ÿง‘โ€โœˆ๏ธ doing ๐Ÿง‘โ€โœˆ๏ธ things (#454)

authored by

Thibault Le Ouay and committed by
GitHub
51ef5cd1 1dc0bc35

+20 -3
+6
apps/server/fly.sh
··· 1 + #!/bin/bash 2 + 3 + 4 + fly machines list --json | jq .[].id | sed 's/"//g' | while read machine; do 5 + fly machines update $machine --restart always --yes 6 + done
+2 -2
apps/server/fly.toml
··· 13 13 [http_service] 14 14 internal_port = 3000 15 15 force_https = true 16 - auto_stop_machines = true 16 + auto_stop_machines = false 17 17 auto_start_machines = true 18 - min_machines_running = 12 18 + min_machines_running = 2 19 19 processes = ["app"] 20 20 [http_service.concurrency] 21 21 type = "requests"
-1
apps/server/src/checker/alerting.ts
··· 4 4 selectMonitorSchema, 5 5 selectNotificationSchema, 6 6 } from "@openstatus/db/src/schema"; 7 - import type { flyRegions } from "@openstatus/utils"; 8 7 import { flyRegionsDict } from "@openstatus/utils"; 9 8 10 9 import { providerToFunction } from "./utils";
+12
apps/server/src/checker/index.ts
··· 54 54 JSON.stringify(result.data), 55 55 e, 56 56 ); 57 + if (result.data.status === "error") { 58 + console.log( 59 + `The monitor was already in error we should not retry checker URL: ${result.data}`, 60 + ); 61 + return c.text("Ok", 200); 62 + } 57 63 return c.text("Internal Server Error", 500); 58 64 } 59 65 }); ··· 96 102 ); 97 103 return c.text("Ok", 200); 98 104 } catch (e) { 105 + if (result.data.status === "error") { 106 + console.log( 107 + `The monitor was already in error we should not retry checker URL: ${result.data}`, 108 + ); 109 + return c.text("Ok", 200); 110 + } 99 111 console.error( 100 112 `fail checker URL: ${result.data.url} monitorId ${result.data.monitorId}`, 101 113 JSON.stringify(result.data),