@@ -1408,7 +1408,13 @@ def process_pipe(self, *, path, cache, fd, mode, user=None, group=None):
14081408 item .uid = uid
14091409 if gid is not None :
14101410 item .gid = gid
1411- self .process_file_chunks (item , cache , self .stats , self .show_progress , backup_io_iter (self .chunker .chunkify (fd )))
1411+ self .print_file_status (None , path , phase = "start" )
1412+ try :
1413+ self .process_file_chunks (
1414+ item , cache , self .stats , self .show_progress , backup_io_iter (self .chunker .chunkify (fd ))
1415+ )
1416+ finally :
1417+ self .print_file_status (None , path , phase = "end" )
14121418 item .get_size (memorize = True )
14131419 self .stats .nfiles += 1
14141420 self .add_item (item , stats = self .stats )
@@ -1475,17 +1481,21 @@ def process_file(self, *, path, parent_fd, name, st, cache, flags=flags_normal,
14751481 # Only chunkify the file if needed
14761482 changed_while_backup = False
14771483 if "chunks" not in item :
1478- start_reading = time .time_ns ()
1479- with backup_io ("read" ):
1480- self .process_file_chunks (
1481- item ,
1482- cache ,
1483- self .stats ,
1484- self .show_progress ,
1485- backup_io_iter (self .chunker .chunkify (None , fd )),
1486- )
1487- self .stats .chunking_time = self .chunker .chunking_time
1488- end_reading = time .time_ns ()
1484+ self .print_file_status (None , path , phase = "start" )
1485+ try :
1486+ start_reading = time .time_ns ()
1487+ with backup_io ("read" ):
1488+ self .process_file_chunks (
1489+ item ,
1490+ cache ,
1491+ self .stats ,
1492+ self .show_progress ,
1493+ backup_io_iter (self .chunker .chunkify (None , fd )),
1494+ )
1495+ self .stats .chunking_time = self .chunker .chunking_time
1496+ end_reading = time .time_ns ()
1497+ finally :
1498+ self .print_file_status (None , path , phase = "end" )
14891499 with backup_io ("fstat2" ):
14901500 st2 = os .fstat (fd )
14911501 if self .files_changed == "disabled" or is_special_file :
0 commit comments