💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
Catch exceptions during scheduled workflow runs #206
davidmezzettif6150e93f0c5
diff --git a/src/python/txtai/workflow/base.py b/src/python/txtai/workflow/base.pyindex 86a5691a..bc9eb285 100644--- a/src/python/txtai/workflow/base.py+++ b/src/python/txtai/workflow/base.py@@ -4,6 +4,7 @@ Workflow moduleimport loggingimport time+import tracebackfrom datetime import datetime@@ -93,8 +94,12 @@ class Workflow:time.sleep(schedule.timestamp() - time.time())# Run workflow- for _ in self(elements):- pass+ # pylint: disable=W0703+ try:+ for _ in self(elements):+ pass+ except Exception:+ logger.error(traceback.format_exc())# Decrement iterations remaining, if necessaryif iterations is not None: