fix log level parameter override, Fixes #1166 (#1167)

main
Yongtao Zhang 5 years ago committed by Selwin Ong
parent cf50151853
commit 5bb5fda1a6

@ -249,6 +249,10 @@ def worker(cli_config, burst, logging_level, name, results_ttl,
from rq.contrib.sentry import register_sentry from rq.contrib.sentry import register_sentry
register_sentry(sentry_dsn) 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) worker.work(burst=burst, logging_level=logging_level, date_format=date_format, log_format=log_format, max_jobs=max_jobs)
except ConnectionError as e: except ConnectionError as e:
print(e) print(e)

Loading…
Cancel
Save