Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! fixup! fixup! Adapt to redis 3.*
Browse files Browse the repository at this point in the history
  • Loading branch information
em92 committed Aug 10, 2024
1 parent 8c21675 commit 24cf32a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions python/minqlx/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,6 @@ def close(self):
Redis._pool = None

if redis.VERSION > (3,):
def setex(self, name, time, value):
return self.r.setex(name, value, time)

def zincrby(self, name, value, amount=1):
return self.r.zincrby(name, amount, value)

Expand Down
2 changes: 1 addition & 1 deletion python/tests/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def test_setex_01(self):
test_value = "test value"
timeout = 1

c.setex(key, test_value, timeout)
c.setex(key, timeout, test_value)
self.assertEqual(c.get(key), test_value, "Too small timeout value?")
sleep(timeout + 0.5)
self.assertEqual(c.get(key), None)
Expand Down

0 comments on commit 24cf32a

Please sign in to comment.