Skip to content

Commit

Permalink
Add support for redis password (#1508)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaoyingz authored May 8, 2023
1 parent 37a59f2 commit acf5df2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions qlib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def register_from_C(config, skip_register=True):
"redis_host": "127.0.0.1",
"redis_port": 6379,
"redis_task_db": 1,
"redis_password": None,
# This value can be reset via qlib.init
"logging_level": logging.INFO,
# Global configuration of qlib log
Expand Down
2 changes: 1 addition & 1 deletion qlib/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#################### Server ####################
def get_redis_connection():
"""get redis connection instance."""
return redis.StrictRedis(host=C.redis_host, port=C.redis_port, db=C.redis_task_db)
return redis.StrictRedis(host=C.redis_host, port=C.redis_port, db=C.redis_task_db, password=C.redis_password)


#################### Data ####################
Expand Down

0 comments on commit acf5df2

Please sign in to comment.