File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/modules Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -251,19 +251,16 @@ def _is_zip_file(file_path: Path) -> bool:
251251async def _move_file_to_input_port (
252252 final_path : Path , downloaded_file : Path , dest_folder : PrunableFolder
253253) -> None :
254- _logger .debug ("moving %s" , downloaded_file )
255- final_path = final_path / downloaded_file .name
254+ with log_context (_logger , logging .DEBUG , f"moving { downloaded_file } " ):
255+ final_path = final_path / downloaded_file .name
256+ # ensure parent exists
257+ final_path .parent .mkdir (exist_ok = True , parents = True )
256258
257- # ensure parent exists
258- final_path .parent .mkdir (exist_ok = True , parents = True )
259+ await _shutil_move (downloaded_file , final_path )
259260
260- await _shutil_move (downloaded_file , final_path )
261-
262- # NOTE: after the download the current value of the port
263- # makes sure previously downloaded files are removed
264- dest_folder .prune (exclude = {final_path })
265-
266- _logger .debug ("file moved to %s" , final_path )
261+ # NOTE: after the port content changes, make sure old files
262+ # which are no longer part of the port, are removed
263+ dest_folder .prune (exclude = {final_path })
267264
268265
269266async def _get_data_from_port (
You can’t perform that action at this time.
0 commit comments