Skip to content

Commit 4e2adc5

Browse files
committed
πŸ› Bugfix: knowledgebase fail to process when upload .pdf files
1 parent c7dc576 commit 4e2adc5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

β€Žbackend/data_process/tasks.pyβ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,11 @@ def process(
218218
logger.info(
219219
f"[{self.request.id}] PROCESS TASK: Ray processing completed, got {len(chunks) if chunks else 0} chunks")
220220

221-
# Persist chunks into Redis via Ray (fire-and-forget, don't block)
221+
# Persist chunks into Redis via Ray (synchronous to ensure data is ready before forward task)
222222
redis_key = f"dp:{task_id}:chunks"
223223
actor.store_chunks_in_redis.remote(redis_key, chunks)
224224
logger.info(
225-
f"[{self.request.id}] PROCESS TASK: Scheduled store_chunks_in_redis for key '{redis_key}'")
225+
f"[{self.request.id}] PROCESS TASK: Stored chunks in Redis at key '{redis_key}'")
226226

227227
end_time = time.time()
228228
elapsed_time = end_time - start_time
@@ -252,11 +252,11 @@ def process(
252252
logger.info(
253253
f"[{self.request.id}] PROCESS TASK: Ray processing completed, got {len(chunks) if chunks else 0} chunks")
254254

255-
# Persist chunks into Redis via Ray (fire-and-forget, don't block)
255+
# Persist chunks into Redis via Ray (synchronous to ensure data is ready before forward task)
256256
redis_key = f"dp:{task_id}:chunks"
257257
actor.store_chunks_in_redis.remote(redis_key, chunks)
258258
logger.info(
259-
f"[{self.request.id}] PROCESS TASK: Scheduled store_chunks_in_redis for key '{redis_key}'")
259+
f"[{self.request.id}] PROCESS TASK: Stored chunks in Redis at key '{redis_key}'")
260260

261261
end_time = time.time()
262262
elapsed_time = end_time - start_time

β€Žbackend/pyproject.tomlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ data-process = [
2525
"celery>=5.3.6",
2626
"flower>=2.0.1",
2727
"nest_asyncio>=1.5.6",
28-
"unstructured[csv,docx,pdf,pptx,xlsx,md]"
28+
"unstructured[csv,docx,pdf,pptx,xlsx,md]==0.18.14"
2929
]
3030
test = [
3131
"pytest",

0 commit comments

Comments
Β (0)