-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated the chromosome service to use the redis package in place of t…
…he aioredis and redisearch packages.
- Loading branch information
1 parent
7367958
commit 7f097e7
Showing
5 changed files
with
6 additions
and
67 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# dependencies | ||
import aioredis | ||
import redis.asyncio as redis | ||
|
||
|
||
async def connectToRedis(host='localhost', port=6379, db=0, password=None): | ||
# connect to database | ||
connection = await aioredis.Redis(host=host, port=port, db=db, password=password, decode_responses=True) | ||
connection = await redis.Redis(host=host, port=port, db=db, password=password, decode_responses=True) | ||
# ping to force connection, preventing errors downstream | ||
await connection.ping() | ||
return connection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters