diff --git a/api/extensions/ext_celery.py b/api/extensions/ext_celery.py index 504899c2765b97..c60a33d64da409 100644 --- a/api/extensions/ext_celery.py +++ b/api/extensions/ext_celery.py @@ -5,6 +5,7 @@ from flask import Flask from configs import dify_config +import pytz def init_app(app: Flask) -> Celery: @@ -43,6 +44,11 @@ def __call__(self, *args: object, **kwargs: object) -> object: result_backend=dify_config.CELERY_RESULT_BACKEND, broker_transport_options=broker_transport_options, broker_connection_retry_on_startup=True, + worker_log_format=dify_config.LOG_FORMAT, + worker_task_log_format=dify_config.LOG_FORMAT, + worker_logfile=dify_config.LOG_FILE, + worker_hijack_root_logger=False, + timezone=pytz.timezone(dify_config.LOG_TZ), ) if dify_config.BROKER_USE_SSL: