Support QUEUES as a config setting in settings files.

main
Vincent Driessen 12 years ago
parent 81270c8e59
commit c0df77f84d

@ -39,6 +39,9 @@ def setup_default_arguments(args, settings):
if args.password is None: if args.password is None:
args.password = settings.get('REDIS_PASSWORD', None) args.password = settings.get('REDIS_PASSWORD', None)
if not args.queues:
args.queues = settings.get('QUEUES', ['default'])
def setup_redis(args): 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,

@ -50,7 +50,7 @@ def parse_args():
parser.add_argument('--path', '-P', default='.', help='Specify the import path.') parser.add_argument('--path', '-P', default='.', help='Specify the import path.')
parser.add_argument('--verbose', '-v', action='store_true', default=False, help='Show more output') parser.add_argument('--verbose', '-v', action='store_true', default=False, help='Show more output')
parser.add_argument('--sentry-dsn', action='store', default=None, metavar='URL', help='Report exceptions to this Sentry DSN') parser.add_argument('--sentry-dsn', action='store', default=None, metavar='URL', help='Report exceptions to this Sentry DSN')
parser.add_argument('queues', nargs='*', default=['default'], help='The queues to listen on (default: \'default\')') parser.add_argument('queues', nargs='*', help='The queues to listen on (default: \'default\')')
return parser.parse_args() return parser.parse_args()

Loading…
Cancel
Save