Skip to content

Commit

Permalink
celery worker log format following LOG_FORMAT env#9404
Browse files Browse the repository at this point in the history
Signed-off-by: root <[email protected]>
  • Loading branch information
root committed Oct 29, 2024
1 parent 5580bcf commit b53bce5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/extensions/ext_celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from flask import Flask

from configs import dify_config
import pytz


def init_app(app: Flask) -> Celery:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit b53bce5

Please sign in to comment.