Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion scripts/kanban_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
"""
import json, pathlib, datetime, sys, subprocess, logging, os, re

_BASE = pathlib.Path(__file__).resolve().parent.parent
# 优先使用环境变量 EDICT_HOME,兜底才用脚本相对路径
# 这样脚本被 sync 到各 workspace 后仍能正确写入中央数据库
_BASE = pathlib.Path(os.environ['EDICT_HOME']) if 'EDICT_HOME' in os.environ else pathlib.Path(__file__).resolve().parent.parent
TASKS_FILE = _BASE / 'data' / 'tasks_source.json'
REFRESH_SCRIPT = _BASE / 'scripts' / 'refresh_live_data.py'

Expand Down
2 changes: 2 additions & 0 deletions scripts/run_loop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# EDICT_HOME 指向中央仓库根目录,供各 workspace 里的 kanban_update.py 定位中央数据库
export EDICT_HOME="$(dirname "$SCRIPT_DIR")"
INTERVAL="${1:-15}"
LOG="/tmp/sansheng_liubu_refresh.log"
PIDFILE="/tmp/sansheng_liubu_refresh.pid"
Expand Down