Quellcode durchsuchen

fix minio helth bug (#850)

### What problem does this PR solve?

#643 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.6.0
KevinHuSh vor 1 Jahr
Ursprung
Commit
a12fcf9156
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden
3 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 1
    1
      deepdoc/parser/excel_parser.py
  2. 1
    1
      rag/app/one.py
  3. 1
    1
      rag/utils/minio_conn.py

+ 1
- 1
deepdoc/parser/excel_parser.py Datei anzeigen





class RAGFlowExcelParser: class RAGFlowExcelParser:
def html(self, fnm,chunk_rows=256):
def html(self, fnm, chunk_rows=256):
if isinstance(fnm, str): if isinstance(fnm, str):
wb = load_workbook(fnm) wb = load_workbook(fnm)
else: else:

+ 1
- 1
rag/app/one.py Datei anzeigen

elif re.search(r"\.xlsx?$", filename, re.IGNORECASE): elif re.search(r"\.xlsx?$", filename, re.IGNORECASE):
callback(0.1, "Start to parse.") callback(0.1, "Start to parse.")
excel_parser = ExcelParser() excel_parser = ExcelParser()
sections = excel_parser.html(binary , 10000000)
sections = excel_parser.html(binary, 1000000000)
elif re.search(r"\.txt$", filename, re.IGNORECASE): elif re.search(r"\.txt$", filename, re.IGNORECASE):
callback(0.1, "Start to parse.") callback(0.1, "Start to parse.")

+ 1
- 1
rag/utils/minio_conn.py Datei anzeigen

self.conn = None self.conn = None


def health(self): def health(self):
bucket, fnm, binary = "_t@@@1", "_t@@@1", b"_t@@@1"
bucket, fnm, binary = "txtxtxtxt1", "txtxtxtxt1", b"_t@@@1"
if not self.conn.bucket_exists(bucket): if not self.conn.bucket_exists(bucket):
self.conn.make_bucket(bucket) self.conn.make_bucket(bucket)
r = self.conn.put_object(bucket, fnm, r = self.conn.put_object(bucket, fnm,

Laden…
Abbrechen
Speichern