#2372 TaskManager: clean both result and results dirs
Merged 2 years ago by mikem. Opened 2 years ago by julian8628.
julian8628/koji bootstrap-result  into  master

file modified
+7 -4
@@ -767,10 +767,13 @@ 

                              self.logger.info("%s: clearing rootdir" % desc2)

                          for fn in flist:

                              safe_rmtree("%s/%s" % (rootdir, fn), unmount=True, strict=False)

-                         resultdir = "%s/result" % d

-                         if os.path.isdir(resultdir):

-                             self.logger.info("%s: clearing resultdir" % desc2)

-                             safe_rmtree(resultdir, unmount=True, strict=False)

+                         # bootstrap's resultdir is 'results', so we try the best to remove both

+                         # 'result(s)' dirs

+                         for r in ('result', 'results'):

+                             resultdir = "%s/%s" % (d, r)

+                             if os.path.isdir(resultdir):

+                                 self.logger.info("%s: clearing resultdir: %s" % (desc2, resultdir))

+                                 safe_rmtree(resultdir, unmount=True, strict=False)

                  else:

                      self.logger.debug("Recent buildroot: %s: %i seconds" % (desc, age))

          self.logger.debug("Local buildroots: %d" % len(local_br))

Metadata Update from @julian8628:
- Pull-request tagged with: testing-ready

2 years ago

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

2 years ago

Commit a04f641 fixes this pull-request

Pull-Request has been merged by mikem

2 years ago