parameters: (self)
docstring: Command entry point for the rsync command.
docstring_summary: Command entry point for the rsync command.
docstring_tokens: Command entry point for the rsync command .
function: def RunCommand(self):
      """Command entry point for the rsync command."""
      self._ParseOpts()
      if self.compute_file_checksums and not UsingCrcmodExtension(crcmod):
        self.logger.warn(SLOW_CRCMOD_WARNING)
  
      src_url = self._InsistContainer(self.args[0], False)
      dst_url = self._InsistContainer(self.args[1], True)
  
      # Tracks if any copy or rm operations failed.
      self.op_failure_count = 0
  
      # List of attributes to share/manage across multiple processes in
      # parallel (-m) mode.
      shared_attrs = ['op_failure_count']
  
      for signal_num in GetCaughtSignals():
        RegisterSignalHandler(signal_num, _HandleSignals)
  
      # Perform sync requests in parallel (-m) mode, if requested, using
      # configured number of parallel processes and threads. Otherwise,
      # perform requests with sequential function calls in current process.
      diff_iterator = _DiffIterator(self, src_url, dst_url)
      self.logger.info('Starting synchronization')
      try:
        self.Apply(_RsyncFunc, diff_iterator, _RsyncExceptionHandler,
                   shared_attrs, arg_checker=_DiffToApplyArgChecker,
                   fail_on_error=True)
      finally:
        CleanUpTempFiles()
  
      if self.op_failure_count:
        plural_str = 's' if self.op_failure_count else ''
        raise CommandException(
            '%d file%s/object%s could not be copied/removed.' %
            (self.op_failure_count, plural_str, plural_str))
function_tokens: def RunCommand ( self ) : self . _ParseOpts ( ) if self . compute_file_checksums and not UsingCrcmodExtension ( crcmod ) : self . logger . warn ( SLOW_CRCMOD_WARNING ) src_url = self . _InsistContainer ( self . args [ 0 ] , False ) dst_url = self . _InsistContainer ( self . args [ 1 ] , True ) # Tracks if any copy or rm operations failed. self . op_failure_count = 0 # List of attributes to share/manage across multiple processes in # parallel (-m) mode. shared_attrs = [ 'op_failure_count' ] for signal_num in GetCaughtSignals ( ) : RegisterSignalHandler ( signal_num , _HandleSignals ) # Perform sync requests in parallel (-m) mode, if requested, using # configured number of parallel processes and threads. Otherwise, # perform requests with sequential function calls in current process. diff_iterator = _DiffIterator ( self , src_url , dst_url ) self . logger . info ( 'Starting synchronization' ) try : self . Apply ( _RsyncFunc , diff_iterator , _RsyncExceptionHandler , shared_attrs , arg_checker = _DiffToApplyArgChecker , fail_on_error = True ) finally : CleanUpTempFiles ( ) if self . op_failure_count : plural_str = 's' if self . op_failure_count else '' raise CommandException ( '%d file%s/object%s could not be copied/removed.' % ( self . op_failure_count , plural_str , plural_str ) )