Skip to content

Commit 57a83ec

Browse files
authored
Remove unused code (infiniflow#10938)
### What problem does this PR solve? As title ### Type of change - [x] Refactoring Signed-off-by: Jin Hai <haijin.chn@gmail.com>
1 parent 6447b73 commit 57a83ec

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

api/utils/file_utils.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
from api.db import FileType
4646

4747
PROJECT_BASE = os.getenv("RAG_PROJECT_BASE") or os.getenv("RAG_DEPLOY_BASE")
48-
RAG_BASE = os.getenv("RAG_BASE")
4948

5049
LOCK_KEY_pdfplumber = "global_shared_lock_pdfplumber"
5150
if LOCK_KEY_pdfplumber not in sys.modules:
@@ -67,36 +66,6 @@ def get_project_base_directory(*args):
6766
return os.path.join(PROJECT_BASE, *args)
6867
return PROJECT_BASE
6968

70-
71-
def get_rag_directory(*args):
72-
global RAG_BASE
73-
if RAG_BASE is None:
74-
RAG_BASE = os.path.abspath(
75-
os.path.join(
76-
os.path.dirname(os.path.realpath(__file__)),
77-
os.pardir,
78-
os.pardir,
79-
os.pardir,
80-
)
81-
)
82-
if args:
83-
return os.path.join(RAG_BASE, *args)
84-
return RAG_BASE
85-
86-
87-
def get_rag_python_directory(*args):
88-
return get_rag_directory("python", *args)
89-
90-
91-
def get_home_cache_dir():
92-
dir = os.path.join(os.path.expanduser("~"), ".ragflow")
93-
try:
94-
os.mkdir(dir)
95-
except OSError:
96-
pass
97-
return dir
98-
99-
10069
@cached(cache=LRUCache(maxsize=10))
10170
def load_json_conf(conf_path):
10271
if os.path.isabs(conf_path):

0 commit comments

Comments
 (0)