From 6be02b57602e7c9dc853eb26f1a5d1036ba1a68f Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Fri, 16 Aug 2024 16:04:20 +0200 Subject: [PATCH] update cron jobs --- app/cron_ownership_stats.py | 2 +- app/cron_price_alert.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/cron_ownership_stats.py b/app/cron_ownership_stats.py index edaaa19..4c97a63 100644 --- a/app/cron_ownership_stats.py +++ b/app/cron_ownership_stats.py @@ -16,7 +16,7 @@ load_dotenv() api_key = os.getenv('FMP_API_KEY') -include_current_quarter = False +include_current_quarter = True async def get_data(session, symbol, max_retries=3, initial_delay=1): diff --git a/app/cron_price_alert.py b/app/cron_price_alert.py index 5bc62e8..5075141 100755 --- a/app/cron_price_alert.py +++ b/app/cron_price_alert.py @@ -147,7 +147,7 @@ async def run(): } pb.collection('notifications').create(newNotification) #send alert via email - recipient = item.email + recipient = (pb.collection('users').get_one(item.user)).email send_email(recipient, symbol, item.asset_type, current_price, target_price, item.condition) try: asyncio.run(run())