Spaces:
Running
Running
James McCool
commited on
Commit
·
ff22721
1
Parent(s):
1bbf3e4
Lowered TTLs
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ gcservice_account, gcservice_account2, db, NBA_Data = init_conn()
|
|
53 |
dk_columns = ['PG', 'SG', 'SF', 'PF', 'C', 'G', 'F', 'FLEX', 'salary', 'proj', 'Team', 'Team_count', 'Secondary', 'Secondary_count', 'Own']
|
54 |
fd_columns = ['PG1', 'PG2', 'SG1', 'SG2', 'SF1', 'SF2', 'PF1', 'PF2', 'C1', 'salary', 'proj', 'Team', 'Team_count', 'Secondary', 'Secondary_count', 'Own']
|
55 |
|
56 |
-
@st.cache_data(ttl=
|
57 |
def load_overall_stats():
|
58 |
collection = db["DK_Player_Stats"]
|
59 |
cursor = collection.find()
|
@@ -122,7 +122,7 @@ def load_overall_stats():
|
|
122 |
|
123 |
return dk_raw, fd_raw, dk_raw_sec, fd_raw_sec, roo_raw, timestamp, roo_backlog
|
124 |
|
125 |
-
@st.cache_data(ttl =
|
126 |
def init_DK_lineups():
|
127 |
|
128 |
collection = db["DK_NBA_seed_frame"]
|
@@ -134,7 +134,7 @@ def init_DK_lineups():
|
|
134 |
|
135 |
return DK_seed
|
136 |
|
137 |
-
@st.cache_data(ttl =
|
138 |
def init_FD_lineups():
|
139 |
|
140 |
collection = db["FD_NBA_seed_frame"]
|
|
|
53 |
dk_columns = ['PG', 'SG', 'SF', 'PF', 'C', 'G', 'F', 'FLEX', 'salary', 'proj', 'Team', 'Team_count', 'Secondary', 'Secondary_count', 'Own']
|
54 |
fd_columns = ['PG1', 'PG2', 'SG1', 'SG2', 'SF1', 'SF2', 'PF1', 'PF2', 'C1', 'salary', 'proj', 'Team', 'Team_count', 'Secondary', 'Secondary_count', 'Own']
|
55 |
|
56 |
+
@st.cache_data(ttl=60)
|
57 |
def load_overall_stats():
|
58 |
collection = db["DK_Player_Stats"]
|
59 |
cursor = collection.find()
|
|
|
122 |
|
123 |
return dk_raw, fd_raw, dk_raw_sec, fd_raw_sec, roo_raw, timestamp, roo_backlog
|
124 |
|
125 |
+
@st.cache_data(ttl = 60)
|
126 |
def init_DK_lineups():
|
127 |
|
128 |
collection = db["DK_NBA_seed_frame"]
|
|
|
134 |
|
135 |
return DK_seed
|
136 |
|
137 |
+
@st.cache_data(ttl = 60)
|
138 |
def init_FD_lineups():
|
139 |
|
140 |
collection = db["FD_NBA_seed_frame"]
|