code: def set_progress(self, scan_id, progress):
          
  
          if progress > 0 and progress <= 100:
              self.scans_table[scan_id]['progress'] = progress
          if progress == 100:
              self.scans_table[scan_id]['end_time'] = int(time.time())
docs: Sets scan_id scan's progress.