diff --git a/rq/scripts/rqworker.py b/rq/scripts/rqworker.py index 5a66f45..0b78d79 100755 --- a/rq/scripts/rqworker.py +++ b/rq/scripts/rqworker.py @@ -64,6 +64,9 @@ def read_config_file(module): def main(): args = parse_args() + if args.path: + sys.path = args.path.split(':') + sys.path + settings = {} if args.config: settings = read_config_file(args.config) @@ -78,9 +81,6 @@ def main(): if args.sentry_dsn is None: args.sentry_dsn = settings.get('SENTRY_DSN', None) - if args.path: - sys.path = args.path.split(':') + sys.path - setup_loghandlers(args) setup_redis(args)