Differentiate lock from lookup key

This commit is contained in:
Zeva Rose 2022-05-03 01:16:21 -06:00
parent 7b3cf0dc95
commit 964e646eeb

View file

@ -70,7 +70,7 @@ class ModcaseCog(Cog):
lookup_key = f"{user.id}|{ctx.guild.id}" lookup_key = f"{user.id}|{ctx.guild.id}"
async with self.bot.redis.lock(lookup_key): async with self.bot.redis.lock("lock|" + lookup_key):
if await self.bot.redis.get(lookup_key): if await self.bot.redis.get(lookup_key):
self.logger.debug(f"User {user.id} in {ctx.guild.id} already has pending case") self.logger.debug(f"User {user.id} in {ctx.guild.id} already has pending case")
return return