[Notes] [Git][BuildStream/buildstream][bst-1.2] 2 commits: _artifactcache/artifactcache.py: Write the cache_size file atomically



Title: GitLab

Tristan Van Berkom pushed to branch bst-1.2 at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • buildstream/_artifactcache/artifactcache.py
    ... ... @@ -571,7 +571,7 @@ class ArtifactCache():
    571 571
         def _write_cache_size(self, size):
    
    572 572
             assert isinstance(size, int)
    
    573 573
             size_file_path = os.path.join(self.context.artifactdir, CACHE_SIZE_FILE)
    
    574
    -        with open(size_file_path, "w") as f:
    
    574
    +        with utils.save_file_atomic(size_file_path, "w") as f:
    
    575 575
                 f.write(str(size))
    
    576 576
     
    
    577 577
         # _read_cache_size()
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]