-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.toml
More file actions
37 lines (31 loc) · 1.17 KB
/
wrangler.toml
File metadata and controls
37 lines (31 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name = "voxrelay-healthcheck"
main = "src/index.ts"
compatibility_date = "2025-12-01"
# KV namespace for caching last-known balances and alert state
# Prevents duplicate alerts within cooldown windows
[[kv_namespaces]]
binding = "HEALTH_KV"
id = "c3932d5ee4c446b6b0c7bf5d3a76581d"
# Cron triggers — balance checks + TTS warmup
# Every 5 min during business hours keeps RunPod GPU warm (idle timeout ~5-10 min)
# Every 2 hours off-peak for baseline monitoring
[triggers]
crons = [
"*/5 9-21 * * 1-5", # Every 5 min, 9 AM – 9 PM ET, weekdays (TTS warmup + balance)
"0 */2 * * *" # Every 2 hours (baseline, covers overnight/weekends)
]
# Environment variables (non-secret — secrets go in .dev.vars)
[vars]
ENVIRONMENT = "production"
VOXRELAY_VERSION = "0.1.0"
RUNPOD_TTS_URL = "https://api.runpod.ai/v2/avwvzx32m18mhu/run"
# Balance thresholds (USD) — override in .dev.vars for prod
RUNPOD_BALANCE_WARN = "10.00"
RUNPOD_BALANCE_CRITICAL = "3.00"
TWILIO_BALANCE_WARN = "20.00"
TWILIO_BALANCE_CRITICAL = "5.00"
# Alert cooldown — don't re-alert for same condition within this window (seconds)
ALERT_COOLDOWN_SECONDS = "3600" # 1 hour
[dev]
port = 8790
local_protocol = "http"