Files
grafana_alerts/run_table.sh
kyy 8f84e00b3c
All checks were successful
Run Report Table / run-script (push) Successful in 12s
GHES에서 지원하는 v3로 변경
2025-09-05 12:22:43 +09:00

22 lines
405 B
Bash

#!/usr/bin/env bash
if [ -f .env ]; then
set -a
source .env
set +a
fi
LOG_DIR="logs/table"
mkdir -p "${LOG_DIR}"
ABSOLUTE_RANGE=${1:-24h}
TS="$(date +%Y%m%d_%H%M%S)"
LOG_FILE="${LOG_DIR}/report_${ABSOLUTE_RANGE}_${TS}.log"
(cd src && python3 -m report_table \
--range "${ABSOLUTE_RANGE}") \
>> "${LOG_FILE}" 2>&1 &
echo "[OK] Started background job."
echo "[OK] Logging to ${LOG_FILE}"