Files
MoFin/scripts/kanban_create.py
T
hmo 17305bed0b fix(pipelines): clear today's real cron errors + kill monitoring false alarms
Real errors fixed (all verified by manual run):
- price_monitor.py: shares None -> TypeError at L584 (now completes 3m7s,
  full 39-stock reassess + zone triggers + Dad push)
- market_insight.py: net_inflow None -> TypeError at L142 (now 0.3s, 5 insights)
- promote_candidates.py: add busy_timeout=30s (DB lock under concurrent writes)
- premarket_full_review.py: 12-dim analysis now detached background launch
  (was doomed by cron 120s script timeout no matter what)

Systemic:
- HERMES_CRON_SCRIPT_TIMEOUT=600 drop-in for both gateway services
  (fixes mofin_health SIGTERM, market_watch timeout, memory_guardian timeout)
- sync_profile_scripts.sh: re-hardlink deploy->profile scripts after every
  deploy (scp replaces files = new inode = broken hardlink = cron silently
  runs stale code; this caused promote to keep failing after my first fix)

Monitoring false-alarm fixes (the '花瓶' problem):
- mofin_health.py: legacy JSONs that migrated to DB (multi_tf_cache/
  macro_context/market/live_prices/price_history/macro_risk_state) no longer
  warn 'no readers'; marked as migrated
- NEW db_freshness section: real pipeline health from DB tables
  (mtf_cache 0.4h / macro_context_log 2h / market_snapshots 2h /
  live_prices 0.4h / price_events.json 0.4h — ALL HEALTHY)
- price_events freshness reads live JSON store (DB table is legacy)
- market.json placeholder created (13+ scripts have fallback paths)

Investigation notes: wiki-self-growth 03:04 key1 429 predates full key6
activation on default gateway; current 8642 verified on key6 and working.
Weekend 'Blocked' jobs verified fixed (vacuum_state_db passes).
2026-07-20 17:30:15 +08:00

39 lines
2.0 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import sqlite3, uuid, time
db = sqlite3.connect('/home/hmo/.hermes/kanban.db')
print("=== statuses ===")
for r in db.execute("SELECT status, COUNT(*) FROM tasks GROUP BY status"):
print(r)
print()
# a pending example if any
r = db.execute("SELECT id, title, status, assignee FROM tasks WHERE status NOT IN ('done','cancelled') LIMIT 5").fetchall()
for x in r:
print(x)
# create the card for zhiwei
tid = 't_' + uuid.uuid4().hex[:8]
now = int(time.time())
title = "12维分析管道已系统化 — 每日自动刷新,请知悉并验证"
body = """笑笑(Sisyphus)完成系统级修复,知微不用再做任何手动补评。
背景:老爸发现盘前全量重评只更新了技术参数,12维LLM深度分析(full_analysis)为空/陈旧。
已落地的系统改动(已全部部署到246并提交git):
1. premarket_full_review.py 新增 Step 1.5:每交易日08:10自动跑 batch_reassess.py --type holding --today14只持仓12维分析每日强制刷新
2. batch_reassess.py 升级:--type holding|watchlist|all 全覆盖;分析超20h视为过期自动重评;现金/总资产改为从 portfolio_summary 实时读取(不再硬编码);港股前缀修复(00700等5位代码)
3. 新增每日12:30 cron「自选12维分析补全-每日午间」(watchlist_12d_backfill.py)109只缺分析的自选股每日补全
4. 验证:300308 已生成1920字12维分析(信号=观望)并写入DB;当前正在后台跑14只持仓的全量补评(/tmp/holdings_12d_backfill.log)
需要知微做的:
- 验证今天开盘简报/盯盘里能正常引用最新12维分析
- 观察今日12:30自选补全任务是否正常触发
- 有问题在kanban回复或XMPP找笑笑"""
db.execute(
"INSERT INTO tasks (id, title, body, assignee, status, priority, created_by, created_at) VALUES (?,?,?,?,?,?,?,?)",
(tid, title, body, 'zhiwei', 'pending', 1, 'xxm', now))
db.commit()
print()
print('created:', tid)
for r in db.execute("SELECT id, title, status, assignee, created_by FROM tasks WHERE id=?", (tid,)):
print(r)
db.close()