ragflow/rag
cutiechi dabbc852c8
Fix: opendal storage health attribute not found & remove duplicate operator scheme initialization (#8265)
### What problem does this PR solve?

This PR fixes two issues in the OpenDAL storage connector:
1. The ‎`health` method was missing, which prevented health checks on
the storage backend.
3. The initialization of the ‎`opendal.Operator` object included a
redundant scheme parameter, causing unnecessary duplication and
potential confusion.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

### Background
- The absence of a ‎`health` method made it difficult to verify the
availability and reliability of the storage service.
- Initializing ‎`opendal.Operator` with both ‎`self._scheme` and
unpacked ‎`**self._kwargs` could lead to errors or unexpected behavior
if the scheme was already included in the kwargs.

### What is changed and how it works?
- Adds a ‎`health` method that writes a test file to verify storage
availability.
- Removes the duplicate scheme parameter from the ‎`opendal.Operator`
initialization to ensure clarity and prevent conflicts.

before:
<img width="762" alt="企业微信截图_46be646f-2e99-4e5e-be67-b1483426e77c"
src="https://github.com/user-attachments/assets/acecbb8c-4810-457f-8342-6355148551ba"
/>
<img width="767" alt="image"
src="https://github.com/user-attachments/assets/147cd5a2-dde3-466b-a9c1-d1d4f0819e5d"
/>

after:
<img width="1123" alt="企业微信截图_09d62997-8908-4985-b89f-7a78b5da55ac"
src="https://github.com/user-attachments/assets/97dc88c9-0f4e-4d77-88b3-cd818e8da046"
/>
2025-06-16 11:35:51 +08:00
..
app Display only the duplicate column names and corresponding original source. (#8138) 2025-06-10 10:16:38 +08:00
llm Feat: implement novitaAI embedding and reranking. (#8250) 2025-06-13 15:42:17 +08:00
nlp fix(search.py):remove hard page_size (#8242) 2025-06-13 14:56:25 +08:00
res Update synonym dictionary file (#7997) 2025-06-03 09:41:53 +08:00
svr Refa: revert to original task message collection logic (#8251) 2025-06-13 16:38:53 +08:00
utils Fix: opendal storage health attribute not found & remove duplicate operator scheme initialization (#8265) 2025-06-16 11:35:51 +08:00
__init__.py Update comments (#4569) 2025-01-21 20:52:28 +08:00
benchmark.py Refactor embedding batch_size (#3825) 2024-12-03 16:22:39 +08:00
prompts.py Refa: chat with tools. (#8210) 2025-06-12 12:31:10 +08:00
raptor.py Fix task_limiter in raptor.py (#8124) 2025-06-09 10:18:03 +08:00
settings.py set PARALLEL_DEVICES default value= 0 (#7935) 2025-05-29 13:32:16 +08:00