Skip to content

Commit

Permalink
Update Aioredlock timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Dicklesworthstone committed Oct 3, 2023
1 parent ce4ef57 commit 02f0ab2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shared_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async def initialize_globals():
subprocess.Popen(['redis-server'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
await asyncio.sleep(1) # Sleep for 1 second to give Redis time to start
redis = await aioredis.create_redis_pool('redis://localhost')
lock_manager = Aioredlock([redis])
lock_manager = Aioredlock([redis], lock_timeout=20000) # 20 second timeout to acquire a lock
await initialize_db()
queue = asyncio.Queue()
db_writer = DatabaseWriter(queue)
Expand Down

0 comments on commit 02f0ab2

Please sign in to comment.