diff --git a/rq/scripts/__init__.py b/rq/scripts/__init__.py index 6a9ea0a..4979d02 100644 --- a/rq/scripts/__init__.py +++ b/rq/scripts/__init__.py @@ -27,13 +27,18 @@ def setup_default_arguments(args, settings): """ Sets up args from settings or defaults """ if args.host is None: args.host = settings.get('REDIS_HOST', 'localhost') + if args.port is None: args.port = int(settings.get('REDIS_PORT', 6379)) else: args.port = int(args.port) + if args.db is None: args.db = settings.get('REDIS_DB', 0) + if args.password is None: + args.password = settings.get('REDIS_PASSWORD', None) + def setup_redis(args): redis_conn = redis.Redis(host=args.host, port=args.port, db=args.db,