File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -482,7 +482,7 @@ def load_annotations(self: TileServer) -> str:
482482 file_path ,
483483 np .array (model_mpp ) / np .array (self .slide_mpps [session_id ]),
484484 )
485- tmp_path = Path (tempfile .gettempdir ()) / "temp .db"
485+ tmp_path = Path (tempfile .gettempdir ()) / f"temp_ { session_id } .db"
486486 sq .dump (tmp_path )
487487 sq = SQLiteStore (tmp_path )
488488 self .pyramids [session_id ]["overlay" ] = AnnotationTileGenerator (
@@ -536,7 +536,7 @@ def change_overlay(self: TileServer) -> str:
536536 sq = SQLiteStore (overlay_path , auto_commit = False )
537537 else :
538538 # make a temporary db for the new annotations
539- tmp_path = Path (tempfile .gettempdir ()) / "temp .db"
539+ tmp_path = Path (tempfile .gettempdir ()) / f"temp_ { session_id } .db"
540540 sq .dump (tmp_path )
541541 sq = SQLiteStore (tmp_path )
542542
@@ -621,7 +621,7 @@ def commit_db(self: TileServer) -> str:
621621 if isinstance (layer , AnnotationTileGenerator ):
622622 if (
623623 layer .store .path .suffix == ".db"
624- and layer .store .path .name != "temp .db"
624+ and layer .store .path .name != f"temp_ { session_id } .db"
625625 ):
626626 logger .info ("%s*.db committed." , layer .store .path .stem )
627627 layer .store .commit ()
You can’t perform that action at this time.
0 commit comments