main
Vincent Driessen 11 years ago
parent c4e7c17994
commit eb5bb6329c

@ -21,6 +21,7 @@ def add_standard_arguments(parser):
parser.add_argument('--socket', '-s', default=None, parser.add_argument('--socket', '-s', default=None,
help='The Redis Unix socket') help='The Redis Unix socket')
def read_config_file(module): def read_config_file(module):
"""Reads all UPPERCASE variables defined in the given module file.""" """Reads all UPPERCASE variables defined in the given module file."""
settings = importlib.import_module(module) settings = importlib.import_module(module)
@ -35,9 +36,9 @@ def setup_default_arguments(args, settings):
args.url = settings.get('REDIS_URL') args.url = settings.get('REDIS_URL')
if (args.host or args.port or args.socket or args.db or args.password): if (args.host or args.port or args.socket or args.db or args.password):
warn('Host, port, db, password options for Redis will not be \ warn('Host, port, db, password options for Redis will not be '
supported in future versions of RQ. \ 'supported in future versions of RQ. '
Please use `REDIS_URL` or `--url` instead.', DeprecationWarning) 'Please use `REDIS_URL` or `--url` instead.', DeprecationWarning)
if args.host is None: if args.host is None:
args.host = settings.get('REDIS_HOST', 'localhost') args.host = settings.get('REDIS_HOST', 'localhost')

Loading…
Cancel
Save