feat(web): authorize corrective smooth reader

This commit is contained in:
mes123456
2026-09-02 18:35:58 +08:00
parent 244e058999
commit 0d61c64150
51 changed files with 127040 additions and 67 deletions

56
my-tools/start_unattended.sh Executable file
View File

@@ -0,0 +1,56 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
CONTROL_DIR="$ROOT_DIR/tests/golden/WBV2"
SCHEDULER_MAX_ITERATIONS="${WBV2_MAX_ITERATIONS:-0}"
SCHEDULER_POLL_MS="${WBV2_POLL_MS:-1000}"
SCHEDULER_PUSH_RETRIES="${WBV2_PUSH_RETRIES:-6}"
WATCHDOG_INTERVAL="${WBV2_WATCHDOG_INTERVAL:-10}"
WATCHDOG_RESTART_DELAY="${WBV2_WATCHDOG_RESTART_DELAY:-5}"
mkdir -p "$CONTROL_DIR"
start_scheduler() {
local pid_file="$CONTROL_DIR/my-tools-scheduler.pid"
if test -f "$pid_file"; then
local scheduler_pid
scheduler_pid="$(tr -d '[:space:]' < "$pid_file")"
if test -n "$scheduler_pid" && kill -0 "$scheduler_pid" 2>/dev/null; then
printf 'scheduler already running: %s\n' "$scheduler_pid"
return
fi
rm -f "$pid_file"
fi
nohup setsid python3 "$ROOT_DIR/my-tools/run_blender_web_scheduler.py" \
--max-iterations "$SCHEDULER_MAX_ITERATIONS" \
--poll-ms "$SCHEDULER_POLL_MS" \
--push-retries "$SCHEDULER_PUSH_RETRIES" \
--commit --push \
> "$CONTROL_DIR/my-tools-scheduler.stdout.log" 2>&1 < /dev/null &
printf 'scheduler launch pid: %s\n' "$!"
}
start_watchdog() {
local pid_file="$CONTROL_DIR/my-tools-watchdog.pid"
if test -f "$pid_file"; then
local watchdog_pid
watchdog_pid="$(tr -d '[:space:]' < "$pid_file")"
if test -n "$watchdog_pid" && kill -0 "$watchdog_pid" 2>/dev/null; then
printf 'watchdog already running: %s\n' "$watchdog_pid"
return
fi
rm -f "$pid_file"
fi
nohup setsid python3 "$ROOT_DIR/my-tools/watch_blender_web_scheduler.py" \
--interval "$WATCHDOG_INTERVAL" \
--restart-delay "$WATCHDOG_RESTART_DELAY" \
--max-iterations "$SCHEDULER_MAX_ITERATIONS" \
--push-retries "$SCHEDULER_PUSH_RETRIES" \
--commit --push \
> "$CONTROL_DIR/my-tools-watchdog.stdout.log" 2>&1 < /dev/null &
printf 'watchdog launch pid: %s\n' "$!"
}
start_scheduler
start_watchdog