Skip to content
Snippets Groups Projects
Commit 67fa96e1 authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

_scheduler/jobs/cleanupjob.py: Use Platform.get_platform() public accessor

This was previously poking directly at the Platform._instance.

Also, use the name 'artifacts' to hold the artifact cache to
be consistent with other parts of the codebase, instead of
calling it 'cache'.
parent 222c5034
No related branches found
No related tags found
1 merge request!779Tristan/fix cache exclusivity 1.2
......@@ -24,13 +24,15 @@ class CleanupJob(Job):
def __init__(self, *args, complete_cb, **kwargs):
super().__init__(*args, **kwargs)
self._complete_cb = complete_cb
self._cache = Platform._instance.artifactcache
platform = Platform.get_platform()
self._artifacts = platform.artifactcache
def child_process(self):
return self._cache.clean()
return self._artifacts.clean()
def parent_complete(self, success, result):
self._cache.set_cache_size(result)
self._artifacts.set_cache_size(result)
if self._complete_cb:
self._complete_cb()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment