06/05 Optimize app
This commit is contained in:
@@ -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.')
|
||||
|
||||
Reference in New Issue
Block a user