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:
@@ -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 ""))
|
||||
|
||||
Reference in New Issue
Block a user