Skip to content

Commit

Permalink
update zadd to redis.asyncio format
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui committed Nov 5, 2023
1 parent 4baa7d5 commit fe7daa1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,14 @@ async def recalc_ranks() -> None:
if inactive_days < 60 and user["privileges"] & 1:
await redis.zadd(
f"ripple:{redis_board}:{mode}",
user["pp"],
user["id"],
{user["id"]: user["pp"]},
)

country = user["country"].lower()
if country != "xx":
await redis.zadd(
f"ripple:{redis_board}:{mode}:{country}",
user["pp"],
user["id"],
{user["id"]: user["pp"]},
)
else:
await redis.zrem(f"ripple:{redis_board}:{mode}", user["id"])
Expand Down

0 comments on commit fe7daa1

Please sign in to comment.