Stop repeat WeChat alerts on option target closes.

Commit monitor status before notify, and use a closing state so unfilled limits retry silently instead of re-alerting.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-15 16:45:43 +08:00
parent ec30a3999c
commit 142b6de0f6
4 changed files with 318 additions and 51 deletions
+2 -2
View File
@@ -34,9 +34,9 @@ def build_options_hub_snapshot(cfg: dict[str, Any]) -> dict[str, Any]:
try:
conn = cfg["get_db"]()
try:
from lib.options.options_target_lib import list_active_targets, targets_by_inst
from lib.options.options_target_lib import list_active_targets, list_closing_targets, targets_by_inst
target_monitors = list_active_targets(conn)
target_monitors = list_active_targets(conn) + list_closing_targets(conn)
tgt_map = targets_by_inst(conn)
for p in positions:
mon = tgt_map.get(str(p.get("inst_id") or ""))