From 8ac019c237413e2b0f49a2630e00d1f396c79c76 Mon Sep 17 00:00:00 2001 From: Codex Date: Thu, 10 Sep 2026 14:52:51 +0800 Subject: [PATCH] Use Codex-only daily refresh --- schedule.conf | 1 - update.sh | 30 ------------------------------ 2 files changed, 31 deletions(-) delete mode 100644 schedule.conf delete mode 100755 update.sh diff --git a/schedule.conf b/schedule.conf deleted file mode 100644 index d00491f..0000000 --- a/schedule.conf +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/update.sh b/update.sh deleted file mode 100755 index e1ccb88..0000000 --- a/update.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# AgentStage runs this hourly. Refresh exactly once during the 12:00 hour. -export TZ=Asia/Shanghai -hour="$(date +%H)" -target_date="$(date -v-1d +%F 2>/dev/null || date -d yesterday +%F)" -if [ "$hour" -ne 12 ]; then exit 0; fi - -: "${TABLEAU_PAT_NAME:?Set TABLEAU_PAT_NAME in the AgentStage runner secret environment}" -: "${TABLEAU_PAT_SECRET:?Set TABLEAU_PAT_SECRET in the AgentStage runner secret environment}" - -repo_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)" -cd "$repo_dir" -runtime_dir="${TABLEAU_HYPER_RUNTIME:-$repo_dir/.runtime/tableau-hyperapi}" -success_marker="$repo_dir/.runtime/last-successful-date" -if [ -f "$success_marker" ] && [ "$(cat "$success_marker")" = "$target_date" ]; then - exit 0 -fi -if ! PYTHONPATH="$runtime_dir" python3 -c 'import tableauhyperapi' 2>/dev/null; then - mkdir -p "$runtime_dir" - python3 -m pip install --disable-pip-version-check --target "$runtime_dir" tableauhyperapi -fi - -tmp_dir="$(mktemp -d)" -trap 'rm -rf "$tmp_dir"' EXIT -raw_file="$tmp_dir/tableau.csv" -PYTHONPATH="$runtime_dir" python3 refresh_tableau.py "$target_date" "$raw_file" -python3 transform_tableau.py "$raw_file" "$target_date" -printf '%s\n' "$target_date" > "$success_marker"