mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
fix(health): tighten cyberThreats maxStaleMin 480->240 to match 2x interval rule (#2133)
Cyber seeder interval is 2h (CYBER_SEED_INTERVAL_MS). Gold standard requires maxStaleMin = 2x interval = 240min. Previous 480min let a dead cyber seeder go unnoticed for 8h before health raised WARN.
This commit is contained in:
@@ -18,6 +18,20 @@ if [ -n "$BRANCH" ] && [ "$BRANCH" != "main" ] && [ "$BRANCH" != "master" ]; the
|
||||
exit 1
|
||||
fi
|
||||
echo " Branch PR state: ${PR_STATE:-unknown}"
|
||||
|
||||
# Guard against branch contamination from a dirty local main.
|
||||
# A feature/fix branch should never have more than 20 commits — if it does,
|
||||
# the branch was likely created from a local main that had unmerged feature branches.
|
||||
COMMIT_COUNT=$(git rev-list --count origin/main..HEAD 2>/dev/null || echo 0)
|
||||
if [ "$COMMIT_COUNT" -gt 20 ]; then
|
||||
echo ""
|
||||
echo "============================================================"
|
||||
echo "ERROR: Branch '$BRANCH' is $COMMIT_COUNT commits ahead of origin/main."
|
||||
echo "This usually means it was branched from a dirty local main."
|
||||
echo "Fix: create branches from a worktree or use: git checkout -b <name> origin/main"
|
||||
echo "============================================================"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Running type check..."
|
||||
|
||||
@@ -95,7 +95,7 @@ const SEED_META = {
|
||||
outages: { key: 'seed-meta:infra:outages', maxStaleMin: 30 },
|
||||
climateAnomalies: { key: 'seed-meta:climate:anomalies', maxStaleMin: 120 }, // runs as independent Railway cron (0 */2 * * *)
|
||||
unrestEvents: { key: 'seed-meta:unrest:events', maxStaleMin: 120 }, // 45min cron; 120 = 2h grace (was 75 = 30min buffer, too tight)
|
||||
cyberThreats: { key: 'seed-meta:cyber:threats', maxStaleMin: 480 },
|
||||
cyberThreats: { key: 'seed-meta:cyber:threats', maxStaleMin: 240 }, // 2h interval; 240min = 2x interval
|
||||
cryptoQuotes: { key: 'seed-meta:market:crypto', maxStaleMin: 30 },
|
||||
etfFlows: { key: 'seed-meta:market:etf-flows', maxStaleMin: 60 },
|
||||
gulfQuotes: { key: 'seed-meta:market:gulf-quotes', maxStaleMin: 30 },
|
||||
|
||||
Reference in New Issue
Block a user