| |
@@ -683,7 +683,8 @@
|
| |
# index
|
| |
missed_br = dict([(row['id'], row) for row in missed_br])
|
| |
tasks = dict([(row['id'], row) for row in self.session.getTaskInfo(tasks)])
|
| |
- for id in local_only:
|
| |
+ # go from +- oldest
|
| |
+ for id in sorted(local_only):
|
| |
# Cleaning options
|
| |
# - wait til later
|
| |
# - "soft" clean (leaving empty root/ dir)
|
| |
@@ -708,8 +709,10 @@
|
| |
age < self.options.failed_buildroot_lifetime:
|
| |
# XXX - this could be smarter
|
| |
# keep buildroots for failed tasks around for a little while
|
| |
- self.logger.debug("Keeping failed buildroot: %s" % desc)
|
| |
- continue
|
| |
+ if self.checkSpace():
|
| |
+ # we can leave it in place, otherwise delete it
|
| |
+ self.logger.debug("Keeping failed buildroot: %s" % desc)
|
| |
+ continue
|
| |
topdir = data['dir']
|
| |
rootdir = None
|
| |
if topdir:
|
| |
Fixes: https://pagure.io/koji/issue/1913