summaryrefslogtreecommitdiffstats
path: root/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'app.py')
-rw-r--r--app.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/app.py b/app.py
index b437d8e..6f8bdfa 100644
--- a/app.py
+++ b/app.py
@@ -7,6 +7,9 @@ import pandas
from sklearn.linear_model import Ridge
import numpy as np
import os
+from dotenv import load_dotenv
+
+load_dotenv()
app = Flask(__name__)
CORS(app)
@@ -43,7 +46,7 @@ def api_subscribers():
def api_subscribers_channel(channel_name):
server = create_database_connection()
query = "SELECT * FROM subscriber_data_historical WHERE name = %s AND timestamp > %s ORDER BY TO_CHAR(timestamp, 'YYYY-MM-DD')"
- data = server.execute_query(query, (channel_name, START_DATE))
+ data = server.execute_query(query, (channel_name, os.environ.get("START_DATE"),))
labels = []
data_points = []
seen_dates = set()
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage