Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
Appends information about the uploaded component to the contents of an
existing tracker file, following the format described in
_CreateParallelUploadTrackerFile.

        def _AppendComponentTrackerToParallelUploadTrackerFile(tracker_file, component,
                                                       tracker_file_lock):
  """Appends information about the uploaded component to the contents of an
     existing tracker file, following the format described in
     _CreateParallelUploadTrackerFile."""
  lines = _GetParallelUploadTrackerFileLinesForComponents([component])
  lines = [line + '\n' for line in lines]
  with tracker_file_lock:
    with open(tracker_file, 'a') as f:
      f.writelines(lines)
        


src/g/s/gsutil-3.42/gslib/tests/test_cp_funcs.py   gsutil(Download)
# limitations under the License.
 
from gslib.commands.cp import _AppendComponentTrackerToParallelUploadTrackerFile
from gslib.commands.cp import _GetPartitionInfo
from gslib.commands.cp import _HashFilename
    expected_contents += new_object
    new_object = ObjectFromTracker(new_object[0], new_object[1])
    _AppendComponentTrackerToParallelUploadTrackerFile(tracker_file, new_object,
                                                       tracker_file_lock)
    with open(tracker_file, 'rb') as f:

src/g/s/gsutil-HEAD/gslib/tests/test_cp_funcs.py   gsutil(Download)
# limitations under the License.
 
from gslib.commands.cp import _AppendComponentTrackerToParallelUploadTrackerFile
from gslib.commands.cp import _GetPartitionInfo
from gslib.commands.cp import _HashFilename
    expected_contents += new_object
    new_object = ObjectFromTracker(new_object[0], new_object[1])
    _AppendComponentTrackerToParallelUploadTrackerFile(tracker_file, new_object,
                                                       tracker_file_lock)
    with open(tracker_file, 'rb') as f: