hmo
d5b8bec897
refactor: retire price_events.json completely — DB is the only store
...
User directive: no JSON, retire it fully, fix all related code.
Changes:
- price_monitor.py: record_event writes DB only; removed EVENTS_PATH/
load_events/save_events entirely
- strategy_feedback.py: price events read from DB only (removed JSON fallback)
- system_health_check.py: removed price_events.json from file-check list,
DB-only event stats (was showing 0/0 due to wrong-DB resolution)
- mo_config.py: removed dead price_events_path property (no callers)
- mofin_health.py: price_events freshness reads DB table (authoritative now)
- mofin_db.py: DATA_DIR/DB_PATH now ABSOLUTE (/home/hmo/MoFin/data) —
was relative __file__.parent, so each hardlinked copy of mofin_db.py
resolved to a DIFFERENT database (canonical vs web-dashboard vs
profile-local third DB with 0 rows of everything except market_snapshots).
This fragmentation was the real cause of health checks reading empty tables.
- Unified all 4 mofin_db copies (root/scripts/deploy/profile) via hardlink
- price_events.json archived to trashbox (fully backfilled: 6353 rows in DB)
Verified:
- record_event lands in DB only, JSON not recreated
- system_health_check: 历史事件 6353 / 今日事件 2965 (was 0/0)
- strategy_feedback + price_monitor full runs clean
2026-07-20 18:10:05 +08:00
..
2026-07-08 12:34:39 +08:00
2026-07-06 14:01:54 +08:00
2026-07-08 23:54:01 +08:00
2026-07-09 17:57:17 +08:00
2026-07-08 12:37:36 +08:00
2026-07-20 01:12:38 +08:00
2026-07-20 17:46:57 +08:00
2026-07-10 13:58:23 +08:00
2026-07-04 09:30:50 +08:00
2026-07-08 23:54:01 +08:00
2026-07-09 19:42:35 +08:00
2026-07-10 14:06:20 +08:00
2026-07-20 18:10:05 +08:00
2026-07-20 08:48:08 +08:00
2026-07-20 01:34:37 +08:00
2026-07-19 20:12:47 +08:00
2026-07-19 11:06:50 +08:00
2026-07-20 08:48:08 +08:00
2026-07-20 17:30:15 +08:00
2026-07-20 17:46:57 +08:00
2026-07-20 17:30:15 +08:00
2026-07-20 01:12:38 +08:00
2026-07-19 11:06:50 +08:00
2026-07-20 17:30:15 +08:00
2026-07-19 11:06:50 +08:00
2026-07-20 17:46:57 +08:00
2026-07-20 17:30:15 +08:00
2026-07-19 11:06:50 +08:00
2026-07-06 14:01:54 +08:00
2026-07-08 23:54:01 +08:00
2026-07-08 23:54:01 +08:00
2026-07-08 19:50:44 +08:00
2026-07-14 10:56:38 +08:00
2026-07-20 01:12:38 +08:00
2026-07-14 12:14:08 +08:00
2026-07-06 14:01:54 +08:00
2026-07-08 23:54:01 +08:00
2026-07-08 19:50:44 +08:00
2026-07-10 11:59:08 +08:00
2026-07-14 11:08:07 +08:00
2026-07-19 20:12:47 +08:00
2026-07-20 01:12:38 +08:00
2026-07-14 15:00:56 +08:00
2026-07-19 11:06:50 +08:00
2026-07-20 01:12:38 +08:00
2026-07-19 11:06:50 +08:00
2026-07-20 17:30:15 +08:00
2026-07-10 10:26:14 +08:00
2026-07-20 01:34:37 +08:00
2026-07-06 14:01:54 +08:00
2026-07-20 17:30:15 +08:00
2026-07-01 23:00:28 +08:00
2026-07-06 14:01:54 +08:00
2026-07-03 12:12:05 +08:00
2026-07-09 19:42:35 +08:00
2026-07-17 23:08:11 +08:00
2026-07-14 10:56:38 +08:00
2026-07-20 17:30:15 +08:00
2026-07-20 17:30:15 +08:00
2026-07-20 17:30:15 +08:00
2026-07-20 17:30:15 +08:00
2026-07-20 17:30:15 +08:00
2026-07-19 20:12:47 +08:00
2026-07-19 11:06:50 +08:00
2026-07-02 13:46:53 +08:00
2026-07-01 23:00:28 +08:00
2026-07-08 12:37:36 +08:00
2026-07-19 12:47:15 +08:00
2026-07-08 20:04:32 +08:00
2026-07-08 12:37:36 +08:00
2026-06-27 01:37:18 +08:00
2026-06-24 00:15:33 +08:00
2026-07-08 12:34:39 +08:00
2026-07-06 14:01:54 +08:00
2026-07-20 18:10:05 +08:00
2026-07-09 16:35:27 +08:00
2026-07-06 14:01:54 +08:00
2026-07-06 14:01:54 +08:00
2026-07-08 23:54:01 +08:00
2026-07-08 23:54:01 +08:00
2026-07-20 18:10:05 +08:00
2026-07-14 10:56:38 +08:00
2026-07-08 12:37:36 +08:00
2026-07-06 14:01:54 +08:00
2026-07-09 11:13:45 +08:00
2026-07-08 12:34:39 +08:00
2026-07-08 23:54:01 +08:00
2026-07-20 17:33:39 +08:00
2026-07-20 18:10:05 +08:00
2026-07-20 17:30:15 +08:00
2026-06-30 02:56:35 +08:00
2026-07-13 12:09:25 +08:00
2026-07-19 20:12:47 +08:00
2026-07-08 23:54:01 +08:00
2026-07-09 13:43:30 +08:00
2026-07-10 12:20:18 +08:00
2026-07-08 16:18:26 +08:00
2026-07-20 18:10:05 +08:00
2026-07-06 14:01:54 +08:00
2026-07-13 12:09:25 +08:00
2026-07-04 09:30:50 +08:00
2026-07-08 23:54:01 +08:00
2026-07-06 14:01:54 +08:00
2026-07-03 12:12:05 +08:00
2026-07-04 09:45:27 +08:00
2026-07-20 00:40:32 +08:00
2026-07-20 08:48:08 +08:00
2026-07-20 18:10:05 +08:00
2026-07-14 10:56:38 +08:00
2026-07-08 12:34:39 +08:00
2026-07-06 14:01:54 +08:00
2026-07-13 12:09:25 +08:00
2026-07-13 12:09:25 +08:00
2026-07-08 23:54:01 +08:00
2026-07-08 23:54:01 +08:00
2026-06-29 23:25:54 +08:00
2026-07-08 12:37:36 +08:00
2026-07-08 23:54:01 +08:00
2026-07-08 12:37:36 +08:00
2026-07-17 23:08:11 +08:00
2026-07-08 23:54:01 +08:00
2026-07-08 12:34:39 +08:00
2026-07-08 23:54:01 +08:00
2026-07-19 10:56:42 +08:00
2026-07-09 13:43:30 +08:00
2026-07-06 14:01:54 +08:00
2026-07-07 11:20:04 +08:00
2026-07-19 23:23:46 +08:00
2026-07-17 23:08:11 +08:00
2026-07-08 12:34:39 +08:00
2026-07-10 21:07:59 +08:00
2026-07-19 20:12:47 +08:00
2026-07-20 18:10:05 +08:00
2026-07-20 17:46:57 +08:00
2026-07-20 17:46:57 +08:00
2026-07-20 17:30:15 +08:00
2026-07-19 23:23:46 +08:00
2026-07-19 22:09:15 +08:00
2026-07-19 20:12:47 +08:00
2026-07-20 01:12:38 +08:00
2026-07-20 00:21:49 +08:00
2026-07-19 20:12:47 +08:00
2026-07-20 17:46:57 +08:00
2026-07-19 11:06:50 +08:00
2026-07-19 23:23:46 +08:00
2026-07-19 20:12:47 +08:00
2026-07-08 12:37:36 +08:00
2026-07-20 08:48:08 +08:00
2026-07-08 10:13:49 +08:00
2026-07-20 01:12:38 +08:00
2026-07-20 08:48:08 +08:00
2026-07-20 00:07:28 +08:00
2026-07-20 17:30:15 +08:00
2026-07-07 15:33:14 +08:00
2026-07-19 11:06:50 +08:00
2026-07-10 12:20:18 +08:00
2026-07-08 12:37:36 +08:00
2026-07-01 23:00:28 +08:00
2026-07-06 14:01:54 +08:00
2026-07-09 10:35:34 +08:00
2026-07-02 01:43:33 +08:00