def download_metadata(self): # this can happen if someone has an existing release without the metadata # built prior to the backfill # can add check to see if metadata has expired/we update metadata # if we want to add more info to metadata if not self.metadata: z = self.zipfile() atomic_write(self.metadata_path, z.read('metadata.json'))
def _cache_commit_history(self, branch, payload): makedirs(self.commits_cache_dir) cache_filename = self._cache_commit_filename(branch) atomic_write(cache_filename, json.dumps(payload))