track recent activities using redis instead of db

This commit is contained in:
rimu 2024-04-04 21:38:26 +13:00
parent 958c8f226f
commit 6264a07c49

View file

@ -33,7 +33,7 @@ def testredis_get():
redis_client = get_redis_connection() redis_client = get_redis_connection()
redis_client.set("cowbell", "1", ex=600) redis_client.set("cowbell", "1", ex=600)
x = redis_client.get('cowbell') x = redis_client.get('cowbell')
if x == '1': if x is not None:
return "Redis: OK" return "Redis: OK"
else: else:
return "Redis: FAIL" return "Redis: FAIL"