celery worker log format following LOG_FORMAT env#9404 (#10016)
Signed-off-by: root <root@localhost.localdomain> Co-authored-by: root <root@localhost.localdomain>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from datetime import timedelta
|
||||
|
||||
import pytz
|
||||
from celery import Celery, Task
|
||||
from celery.schedules import crontab
|
||||
from flask import Flask
|
||||
@@ -43,6 +44,11 @@ def init_app(app: Flask) -> Celery:
|
||||
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:
|
||||
|
Reference in New Issue
Block a user