debug: trace background_reco execution in upload_file.dspy

This commit is contained in:
yumoqing 2026-07-31 18:53:31 +08:00
parent 8dad4e9b5e
commit 2f7acc8120

View File

@ -29,6 +29,11 @@ ext_l = ext.lower()
# creates its own DBPools connection. All args are primitives.
# ============================================================
async def ingest_doc(doc_id, kb_id, file_name, ext_l, real_path):
# DEBUG: verify background_reco executes
try:
with open('/tmp/_bg_trace_' + doc_id + '.txt', 'w') as df:
df.write('ingest_doc started\n')
except: pass
db = DBPools()
text = ''
chunks_n = 0