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:
@@ -580,9 +580,9 @@ def register_options_routes(app: Flask, cfg: dict[str, Any]) -> None:
|
||||
def api_options_targets():
|
||||
conn = cfg["get_db"]()
|
||||
try:
|
||||
from lib.options.options_target_lib import list_active_targets
|
||||
from lib.options.options_target_lib import list_active_targets, list_closing_targets
|
||||
|
||||
return jsonify({"ok": True, "targets": list_active_targets(conn)})
|
||||
return jsonify({"ok": True, "targets": list_active_targets(conn) + list_closing_targets(conn)})
|
||||
finally:
|
||||
conn.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user