fix(scripts): promote UNIQUE crash + candidate_filter DB lock (morning readiness)
Pre-open error sweep (all verified by manual run): - promote_candidates.py: INSERT OR IGNORE + only newly-added stocks count toward promotion/XMPP (was crashing on first duplicate, never finishing; now completes 40s, promoted 74 with correct skip marking) - candidate_filter.py: PRAGMA busy_timeout=30s (was dying on transient 'database is locked' under concurrent cron writes; now completes 9.6s) - price_monitor.py: verified completes 1m55s (< 120s cron timeout) with working LLM reassess via key6 - macro_context_collector.py / divergence_detector.py: previously 'Blocked' by symlink check, now run fine (8.7s / 1m55s) - memory_guardian.py: completes 1m55s with key6 - preflight sync diff: historical, files now identical Production proof: 大脑任务执行 (was 429 every 10min) now status=ok at 01:21
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import json
|
||||
|
||||
targets = ['evolution-pulse', '大脑任务执行', '元自成长-每日', '跨市场背离检测', '宏观新闻采集',
|
||||
'记忆守卫-每日', '开盘前钉对钉验证', '盘前热点扫描', '集合竞价观察',
|
||||
'候选股过滤管道-每30分', '候选股自动提拔-每30分', '价格监控-高频', 'Cron监护-高频',
|
||||
'自选买入区提醒-盘前午间尾盘', '市场精选推荐-每日', '持仓情报-盘后']
|
||||
|
||||
for jf, label in [('/home/hmo/.hermes/profiles/position-analyst/cron/jobs.json', 'pa'),
|
||||
('/home/hmo/.hermes/cron/jobs.json', 'default')]:
|
||||
d = json.load(open(jf))
|
||||
jobs = d if isinstance(d, list) else d.get('jobs', [])
|
||||
for j in jobs:
|
||||
if j.get('name') in targets:
|
||||
err = str(j.get('last_error') or '')[:180]
|
||||
no_agent = j.get('no_agent', False)
|
||||
script = j.get('script', '')
|
||||
print(f"[{label}] {j['name']} | run={str(j.get('last_run_at'))[:19]} | {'script:'+script if no_agent else 'LLM'}")
|
||||
print(f" err: {err}")
|
||||
print()
|
||||
@@ -0,0 +1,10 @@
|
||||
import json
|
||||
|
||||
d = json.load(open('/home/hmo/.hermes/profiles/position-analyst/cron/jobs.json'))
|
||||
jobs = d if isinstance(d, list) else d.get('jobs', [])
|
||||
for j in jobs:
|
||||
if j.get('name') in ('候选股自动提拔-每30分', '候选股过滤管道-每30分', '开盘前钉对钉验证'):
|
||||
print('='*70)
|
||||
print(j['name'], '| last:', str(j.get('last_run_at'))[:19])
|
||||
print(str(j.get('last_error'))[:900])
|
||||
print()
|
||||
Reference in New Issue
Block a user