cleanupjob, cascache: don't write cache size twice

Description

In CleanupJob, don't write the same size update to the cache size file twice. The update received in the 'update-cache-size' message has already been written during ArtifactCache.clean().

This means that we now only do one (write temp file + move into place) for every artifact that we remove, and from one process at a time. In later work we might reconsider the number of temp files we create.

Changes proposed in this merge request:

  • cleanupjob, cascache: write cache size once, don't do it again in CleanupJob.handle_message.
  • cascache: remove redundant assignment
  • cascache: rm redundant calculate_cache_size
  • _artifactcache: fix comment 'remove the size from'
  • _artifactcache: don't define CACHE_SIZE_FILE twice, already defined in cascache.py.

This merge request, when approved, will close:

Helps #957 (closed)


Edited by Angelos Evripiotis

Merge request reports

Loading