| |
@@ -249,10 +249,8 @@
|
| |
logger.error('Unable to remove volume link: %s', path)
|
| |
else:
|
| |
realpath = path
|
| |
- try:
|
| |
- self.manager.rmtree(realpath)
|
| |
- except BaseException:
|
| |
- logger.error(''.join(traceback.format_exception(*sys.exc_info())))
|
| |
+
|
| |
+ self.manager.rmtree(realpath)
|
| |
|
| |
return True
|
| |
|
| |
@@ -340,7 +338,8 @@
|
| |
def rmtree(self, path):
|
| |
"""Spawn (or queue) and rmtree job"""
|
| |
self.logger.info("Queuing rmtree job for %s", path)
|
| |
- self.delete_queue.append(path)
|
| |
+ if path not in self.delete_queue:
|
| |
+ self.delete_queue.append(path)
|
| |
|
| |
def checkQueue(self):
|
| |
finished = [pid for pid in self.delete_pids if self.waitPid(pid)]
|
| |
It is a remnant of previsou unification of rmtree paths. Instead of
deleting tree directly while deleting repo it is put into queue now. So,
other thread looking for expired/deleted repos can find it also and add
it twice. Internal rmtree can check the queue before adding duplicate
path. As a side-effect manager.rmtree can also never fail, so try/except
can be removed from there.
Fixes: https://pagure.io/koji/issue/2716