MCPcopy Index your code
hub / github.com/1Panel-dev/MaxKB / exception_handler

Function exception_handler

apps/knowledge/task/embedding.py:82–88  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

80 ]
81
82 def exception_handler(e):
83 ListenerManagement.update_status(QuerySet(Document).filter(id=document_id), TaskType.EMBEDDING, State.FAILURE)
84 maxkb_logger.error(
85 _("Failed to obtain vector model: {error} {traceback}").format(
86 error=str(e), traceback=traceback.format_exc()
87 )
88 )
89
90 embedding_model = get_embedding_model(model_id, exception_handler)
91 #

Callers 3

get_embedding_modelFunction · 0.85
handle_exceptionFunction · 0.85
handle_exceptionFunction · 0.85

Calls 2

update_statusMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected