logging to info for debugging, remove dead worker

This commit is contained in:
BennyThink 2022-01-06 18:34:42 +08:00
parent acf3b1838b
commit 556521cee1
No known key found for this signature in database
GPG Key ID: 6CD0DBDA5235D481
2 changed files with 6 additions and 5 deletions

View File

@ -45,10 +45,10 @@ services:
env_file: env_file:
- env/ytdl.env - env/ytdl.env
restart: on-failure restart: on-failure
command: ["/usr/local/bin/celery", command: [ "/usr/local/bin/celery",
"-A", "flower_tasks", "flower", "-A", "flower_tasks", "flower",
"--basic_auth=benny:123456", "--basic_auth=benny:123456",
"--address=0.0.0.0", "--persistent"] "--address=0.0.0.0", "--persistent","--purge_offline_workers=1" ]
volumes: volumes:
- ./data/flower:/ytdlbot/ytdlbot/flower - ./data/flower:/ytdlbot/ytdlbot/flower
ports: ports:

View File

@ -29,7 +29,8 @@ def apply_log_formatter():
def customize_logger(logger: "list"): def customize_logger(logger: "list"):
apply_log_formatter() apply_log_formatter()
for log in logger: 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": def get_user_settings(user_id: "str") -> "tuple":