06/05 Optimize app

This commit is contained in:
2026-06-05 15:51:57 -04:00
parent 458044201e
commit 025f3f8823
14 changed files with 425 additions and 64 deletions
+5 -1
View File
@@ -9,7 +9,7 @@ import os
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from app import create_app
from app.services.investment_service import update_prices
from app.services.investment_service import update_prices, check_and_save_price_alerts
app = create_app()
@@ -23,3 +23,7 @@ if __name__ == '__main__':
print(f'[fetch_prices] Updated {len(updated)} ticker(s).')
else:
print('[fetch_prices] No tickers updated.')
print('[fetch_prices] Checking price alerts (threshold=5%)...')
n = check_and_save_price_alerts(threshold=5.0)
print(f'[fetch_prices] {n} alert(s) saved.')