From 725b1078ca162130de76e0260cb56bde16863259 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Thu, 12 Sep 2024 11:25:26 +0200 Subject: [PATCH] bugfixing --- app/cron_reddit_statistics.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/cron_reddit_statistics.py b/app/cron_reddit_statistics.py index a6b11d2..5a0a849 100644 --- a/app/cron_reddit_statistics.py +++ b/app/cron_reddit_statistics.py @@ -29,6 +29,7 @@ etf_cursor.execute("PRAGMA journal_mode = wal") etf_cursor.execute("SELECT DISTINCT symbol FROM etfs") etf_symbols = [row[0] for row in etf_cursor.fetchall()] +total_symbols = stock_symbols + etf_symbols con.close() etf_con.close() @@ -142,7 +143,7 @@ def compute_trending_tickers(daily_stats): 'call': counts['CALL'], 'avgSentiment': round(sum(counts['sentiment']) / len(counts['sentiment']),2) if counts['sentiment'] else 0 } - for symbol, counts in trending.items() + for symbol, counts in trending.items() if symbol in total_symbols ] trending_list.sort(key=lambda x: x['count'], reverse=True)