Skip to content

Commit dc4d74a

Browse files
authored
re-enable tracking of last time an api key was used (#1213)
1 parent 0609700 commit dc4d74a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/server/_security.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,8 @@ def decorated_function(*args, **kwargs):
121121

122122

123123
def update_key_last_time_used(user):
124-
# TODO: reenable this once cc<-->aws latency issues are sorted out, or maybe do this call asynchronously
125-
return
126124
if user:
127125
# update last usage for this user's api key to "now()"
126+
# TODO: consider making this call asynchronously
128127
r = redis.Redis(host=REDIS_HOST, password=REDIS_PASSWORD)
129128
r.set(f"LAST_USED/{user.api_key}", datetime.strftime(datetime.now(), "%Y-%m-%d"))

0 commit comments

Comments
 (0)