Permalink
Browse files

Expose Redis password to scripts

Allow rqworker and rqinfo to connect to
password-protected Redis hosts.
  • Loading branch information...
1 parent 3440e5d commit c705a2f06ab34ffdafc6039ce80e1c6c66e9c45f @sburns sburns committed Sep 4, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 rq/scripts/__init__.py
View
5 rq/scripts/__init__.py
@@ -11,6 +11,8 @@ def add_standard_arguments(parser):
help='The Redis portnumber (default: 6379)')
parser.add_argument('--db', '-d', type=int, default=None,
help='The Redis database (default: 0)')
+ parser.add_argument('--password', '-a', default=None,
+ help='The Redis password (default: None)')
def read_config_file(module):
@@ -34,5 +36,6 @@ def setup_default_arguments(args, settings):
def setup_redis(args):
- redis_conn = redis.Redis(host=args.host, port=args.port, db=args.db)
+ redis_conn = redis.Redis(host=args.host, port=args.port, db=args.db,
+ password=args.password)
use_connection(redis_conn)

0 comments on commit c705a2f

Please sign in to comment.