Tristan Van Berkom pushed to branch tristan/element-processing-order at BuildStream / buildstream
Commits:
-
e1e27346
by Tristan Van Berkom at 2019-01-15T14:17:21Z
1 changed file:
Changes:
| ... | ... | @@ -28,7 +28,7 @@ from contextlib import contextmanager |
| 28 | 28 |
|
| 29 | 29 |
# Local imports
|
| 30 | 30 |
from .resources import Resources, ResourceType
|
| 31 |
-from .jobs import CacheSizeJob, CleanupJob
|
|
| 31 |
+from .jobs import JobStatus, CacheSizeJob, CleanupJob
|
|
| 32 | 32 |
|
| 33 | 33 |
|
| 34 | 34 |
# A decent return code for Scheduler.run()
|
| ... | ... | @@ -292,13 +292,13 @@ class Scheduler(): |
| 292 | 292 |
self._cache_size_running = None
|
| 293 | 293 |
self.resources.release([ResourceType.CACHE, ResourceType.PROCESS])
|
| 294 | 294 |
|
| 295 |
+ # Schedule a cleanup job if we've hit the threshold
|
|
| 295 | 296 |
if status != JobStatus.OK:
|
| 296 | 297 |
return
|
| 297 | 298 |
|
| 298 | 299 |
context = self.context
|
| 299 | 300 |
artifacts = context.artifactcache
|
| 300 | 301 |
|
| 301 |
- # Schedule a cleanup job if we've hit the threshold
|
|
| 302 | 302 |
if artifacts.has_quota_exceeded():
|
| 303 | 303 |
self._cleanup_scheduled = True
|
| 304 | 304 |
|
