From 5bb5fda1a6a2ac35ef4902bf311b0fc5dbfd3cf5 Mon Sep 17 00:00:00 2001 From: Yongtao Zhang Date: Mon, 16 Dec 2019 08:23:36 +0800 Subject: [PATCH] fix log level parameter override, Fixes #1166 (#1167) --- rq/cli/cli.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rq/cli/cli.py b/rq/cli/cli.py index 635f178..fb2ab0b 100755 --- a/rq/cli/cli.py +++ b/rq/cli/cli.py @@ -249,6 +249,10 @@ def worker(cli_config, burst, logging_level, name, results_ttl, from rq.contrib.sentry import register_sentry register_sentry(sentry_dsn) + # if --verbose or --quiet, override --logging_level + if verbose or quiet: + logging_level = None + worker.work(burst=burst, logging_level=logging_level, date_format=date_format, log_format=log_format, max_jobs=max_jobs) except ConnectionError as e: print(e)