Jon Solow
commited on
Commit
·
ac62621
1
Parent(s):
6746db8
Get user count on client instantiation to warm up
Browse files- src/data_storage.py +2 -2
src/data_storage.py
CHANGED
@@ -12,11 +12,11 @@ TOKENS_TABLE = "npcs_tokens"
|
|
12 |
|
13 |
|
14 |
try:
|
15 |
-
|
16 |
except APIError:
|
17 |
# automatic retry
|
18 |
time.sleep(0.5)
|
19 |
-
|
20 |
|
21 |
|
22 |
def update_selection(user_id: str | int, position_id: str, player_id: str):
|
|
|
12 |
|
13 |
|
14 |
try:
|
15 |
+
user_count = supabase_client.table(USERS_TABLE).select("*", count="exact").execute().count
|
16 |
except APIError:
|
17 |
# automatic retry
|
18 |
time.sleep(0.5)
|
19 |
+
user_count = supabase_client.table(USERS_TABLE).select("*", count="exact").execute().count
|
20 |
|
21 |
|
22 |
def update_selection(user_id: str | int, position_id: str, player_id: str):
|