Skip to content

Commit

Permalink
optimize: support redis server use no password
Browse files Browse the repository at this point in the history
  • Loading branch information
blackholll committed Oct 18, 2022
1 parent 2578361 commit 59b89aa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions service/redis_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
redis_db = settings.REDIS_DB
redis_port = settings.REDIS_PORT
redis_password = settings.REDIS_PASSWORD

POOL = redis.ConnectionPool(host=redis_host, port=redis_port, password=redis_password, max_connections=1000)
if redis_password:
POOL = redis.ConnectionPool(host=redis_host, port=redis_port, password=redis_password, max_connections=1000)
else:
POOL = redis.ConnectionPool(host=redis_host, port=redis_port, max_connections=1000)

0 comments on commit 59b89aa

Please sign in to comment.