Improve market data fetching routines.
This commit is contained in:
@@ -373,4 +373,11 @@ def get_all_scanned_subreddits():
|
||||
conn = get_db_connection()
|
||||
results = conn.execute("SELECT DISTINCT name FROM subreddits ORDER BY name ASC;").fetchall()
|
||||
conn.close()
|
||||
return [row['name'] for row in results]
|
||||
return [row['name'] for row in results]
|
||||
|
||||
def get_all_tickers():
|
||||
"""Retrieves the ID and symbol of every ticker in the database."""
|
||||
conn = get_db_connection()
|
||||
results = conn.execute("SELECT id, symbol FROM tickers;").fetchall()
|
||||
conn.close()
|
||||
return results
|
Reference in New Issue
Block a user