File tree Expand file tree Collapse file tree
context_chat_backend/repair Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515)
1616
1717if os .path .exists (vector_db_path ):
18- shutil .rmtree (vector_db_path )
19- os .makedirs (vector_db_path , mode = 0o770 )
18+ for n in os .listdir (vector_db_path ):
19+ if n == 'pgsql' :
20+ continue
21+ if os .path .isdir (os .path .join (vector_db_path , n )):
22+ shutil .rmtree (os .path .join (vector_db_path , n ))
23+ else :
24+ os .remove (os .path .join (vector_db_path , n ))
Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ def main():
3636
3737 all_filenames = os .listdir ('context_chat_backend/repair' )
3838 repair_filenames = [f for f in all_filenames if f .startswith ('repair' ) and f .endswith ('.py' )]
39- repair_filenames .sort (reverse = True )
4039
4140 (previous_app_version , repairs_pending ) = get_previous_version (version_info_path )
4241
@@ -55,7 +54,7 @@ def main():
5554
5655 if introduced_version < previous_app_version :
5756 print (f'No repairs to run for version { introduced_version } .' , flush = True )
58- break
57+ continue
5958
6059 print (f'Running repair { repair_filename } ...' , flush = True , end = '' )
6160
Original file line number Diff line number Diff line change 3333
3434# Ensure the directory exists and has the correct permissions
3535mkdir -p " $DATA_DIR "
36+ chmod +rx " ${APP_PERSISTENT_STORAGE:- persistent_storage} "
37+ chmod +rx " $BASE_DIR "
3638chown -R postgres:postgres " $DATA_DIR "
3739
3840if [ ! -d " $DATA_DIR /base" ]; then
You can’t perform that action at this time.
0 commit comments