PR#2755: kojira: check rm queue before adding new path
Merges #2755 https://pagure.io/koji/pull-request/2755 Fixes: #2716 https://pagure.io/koji/issue/2716 kojira: duplicate deletes
This commit is contained in:
commit
788b2775ed
1 changed files with 4 additions and 5 deletions
|
|
@ -249,10 +249,8 @@ class ManagedRepo(object):
|
|||
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 @@ class RepoManager(object):
|
|||
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)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue