fix: Remove unnecessary decode statement

Since we create our Redis instance with , we don't
need to worry about decoding this value here. Plus this doesn't work
in python3 anyway
This commit is contained in:
Jason Kidd 2025-01-17 13:40:09 -08:00
parent 217e3a13c8
commit c5b67ea430
No known key found for this signature in database
GPG Key ID: 72BF942827539044

View File

@ -26,7 +26,7 @@ class RedisLock:
def release_lock(self): def release_lock(self):
lock_value = self.redis.get(self.lock_name) lock_value = self.redis.get(self.lock_name)
if lock_value and lock_value.decode("utf-8") == self.lock_id: if lock_value and lock_value == self.lock_id:
self.redis.delete(self.lock_name) self.redis.delete(self.lock_name)