From 955b7bde41187ae6adefe626f85f1d937001e864 Mon Sep 17 00:00:00 2001 From: Siarhei Siniak Date: Sun, 7 Jul 2024 12:56:22 +0300 Subject: [PATCH] [~] Refactor --- python/tasks/tiktok/celery.py | 2 +- python/tasks/tiktok/config.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/python/tasks/tiktok/celery.py b/python/tasks/tiktok/celery.py index 5feab9c..d741df5 100644 --- a/python/tasks/tiktok/celery.py +++ b/python/tasks/tiktok/celery.py @@ -21,7 +21,7 @@ app = celery.Celery( kombu_register_json_dataclass() app._backend = Backend(app=app, url=c.celery_result_backend) -app.log.setup(loglevel=logging.INFO) +app.log.setup(loglevel=c.celery_log_level) app.autodiscover_tasks(c.celery_imports) diff --git a/python/tasks/tiktok/config.py b/python/tasks/tiktok/config.py index d030bc4..c797500 100644 --- a/python/tasks/tiktok/config.py +++ b/python/tasks/tiktok/config.py @@ -30,6 +30,7 @@ class tiktok_config_t: celery_broker: str='' celery_result_backend: str='' celery_imports: Iterable[str]=tuple() + celery_log_level: int=logging.INFO def tiktok_config() -> tiktok_config_t.res_t: res = tiktok_config_t.res_t(