Skip to content

Commit

Permalink
fix: move exception to debug mode (#9258)
Browse files Browse the repository at this point in the history
  • Loading branch information
crazywoola authored and laipz8200 committed Oct 12, 2024
1 parent 0115a08 commit 04b9815
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/core/app/task_pipeline/message_cycle_manage.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import logging
from threading import Thread
from typing import Optional, Union

from flask import Flask, current_app

from configs import dify_config
from core.app.entities.app_invoke_entities import (
AdvancedChatAppGenerateEntity,
AgentChatAppGenerateEntity,
Expand Down Expand Up @@ -83,7 +85,9 @@ def _generate_conversation_name_worker(self, flask_app: Flask, conversation_id:
name = LLMGenerator.generate_conversation_name(app_model.tenant_id, query)
conversation.name = name
except Exception as e:
logging.exception(f"generate conversation name failed: {e}")
if dify_config.DEBUG:
logging.exception(f"generate conversation name failed: {e}")
pass

db.session.merge(conversation)
db.session.commit()
Expand Down

0 comments on commit 04b9815

Please sign in to comment.