Skip to content

Commit

Permalink
Patched /tmp/tmpvrpr1k9j/sqli/services/redis.py
Browse files Browse the repository at this point in the history
  • Loading branch information
patched.codes[bot] committed Nov 1, 2024
1 parent 12147a2 commit afe830c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sqli/services/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ def setup_redis(app: Application):


async def _init_redis(app: Application):
"""Initialize Redis connection."""
conf = app['config']['redis']
redis = await aioredis.create_pool((conf['host'], conf['port']),
db=conf['db'])
redis = await aioredis.create_pool((conf['host'], conf['port']), db=conf['db'])
app['redis'] = redis


async def _close_redis(app: Application):
"""Close Redis connection."""
app['redis'].close()
await app['redis'].wait_closed()

0 comments on commit afe830c

Please sign in to comment.