fix(ops): harden cold-start schedule recovery
Some checks failed
Code Review / ai-code-review (push) Successful in 10s
run-migration / migrate (push) Successful in 7s
CD Pipeline / build-and-deploy (push) Has been cancelled
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / tests (push) Has been cancelled
Some checks failed
Code Review / ai-code-review (push) Successful in 10s
run-migration / migrate (push) Successful in 7s
CD Pipeline / build-and-deploy (push) Has been cancelled
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / tests (push) Has been cancelled
This commit is contained in:
@@ -34,8 +34,12 @@ logger = structlog.get_logger(__name__)
|
||||
# 台北時區
|
||||
TZ_TAIPEI = ZoneInfo("Asia/Taipei")
|
||||
|
||||
# Prometheus 端點
|
||||
PROMETHEUS_URL = "http://192.168.0.121:30090"
|
||||
# Prometheus endpoint.
|
||||
#
|
||||
# 2026-05-05 Codex: do not pin this report job to a K3s worker NodePort.
|
||||
# Production already injects PROMETHEUS_URL from ConfigMap, currently the
|
||||
# Docker Prometheus on 110. This keeps reboot recovery independent of 121.
|
||||
PROMETHEUS_URL = settings.PROMETHEUS_URL.rstrip("/")
|
||||
|
||||
# kube-state-metrics 查詢
|
||||
PROM_QUERIES = {
|
||||
@@ -215,7 +219,7 @@ class K3sMonitorService:
|
||||
|
||||
# 發送訊息
|
||||
formatted = status.format()
|
||||
result = await gateway.send_message(formatted)
|
||||
result = await gateway.send_text(formatted)
|
||||
|
||||
if result:
|
||||
logger.info("k3s_daily_report_sent", date=status.report_date)
|
||||
|
||||
@@ -244,7 +244,7 @@ class WeeklyReportService:
|
||||
|
||||
# 發送訊息
|
||||
formatted = report.format()
|
||||
result = await gateway.send_message(formatted)
|
||||
result = await gateway.send_text(formatted)
|
||||
|
||||
if result:
|
||||
logger.info("weekly_report_sent", week=report.week_range)
|
||||
|
||||
Reference in New Issue
Block a user