From 556521cee12689509a35ebb73a1a0cea9859bc5b Mon Sep 17 00:00:00 2001 From: BennyThink Date: Thu, 6 Jan 2022 18:34:42 +0800 Subject: [PATCH] logging to info for debugging, remove dead worker --- docker-compose.yml | 8 ++++---- ytdlbot/utils.py | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0ccdadc..350249f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -45,10 +45,10 @@ services: env_file: - env/ytdl.env restart: on-failure - command: ["/usr/local/bin/celery", - "-A", "flower_tasks", "flower", - "--basic_auth=benny:123456", - "--address=0.0.0.0", "--persistent"] + command: [ "/usr/local/bin/celery", + "-A", "flower_tasks", "flower", + "--basic_auth=benny:123456", + "--address=0.0.0.0", "--persistent","--purge_offline_workers=1" ] volumes: - ./data/flower:/ytdlbot/ytdlbot/flower ports: diff --git a/ytdlbot/utils.py b/ytdlbot/utils.py index 8e3cad8..69cbc80 100644 --- a/ytdlbot/utils.py +++ b/ytdlbot/utils.py @@ -29,7 +29,8 @@ def apply_log_formatter(): def customize_logger(logger: "list"): apply_log_formatter() for log in logger: - logging.getLogger(log).setLevel(level=logging.WARNING) + # TODO: bug fix: lost response sometime. + logging.getLogger(log).setLevel(level=logging.INFO) def get_user_settings(user_id: "str") -> "tuple":