feat: saxo

This commit is contained in:
OpenSquared
2026-07-19 00:55:46 +02:00
parent 38d9ddfd53
commit d4fb15ca9a
8 changed files with 205 additions and 29 deletions

View File

@@ -169,6 +169,15 @@ def startup():
from services.saxo_scheduler import start_saxo_scheduler
start_saxo_scheduler()
# One-time cleanup: collapse snapshot rows stored before save-time dedup existed
try:
from services.database import dedupe_saxo_snapshots
deleted = dedupe_saxo_snapshots()
if deleted:
_log.info(f"[Saxo] Startup cleanup: removed {deleted} redundant snapshot rows")
except Exception as e:
_log.warning(f"[Saxo] Startup snapshot dedupe failed: {e}")
# One-time migration: remove FXStreet-sourced rows (decimal format) — FF sync below will refill from FF
try:
from services.database import get_conn as _get_conn