---
hub/kojihub.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hub/kojihub.py b/hub/kojihub.py
index 4255f80..acdea2b 100644
--- a/hub/kojihub.py
+++ b/hub/kojihub.py
@@ -10535,7 +10535,7 @@ class Host(object):
update = UpdateProcessor('task',
clauses=['parent=%(parent)s'], values=locals())
update.set(awaited=True)
update.execute()
- else:
+ elif tasks:
# wait on specified subtasks
update = UpdateProcessor('task', clauses=['id IN %(tasks)s',
'parent=%(parent)s'], values=locals())
update.set(awaited=True)
@@ -10545,6 +10545,8 @@ class Host(object):
clauses=['id NOT IN %(tasks)s',
'parent=%(parent)s', 'awaited=true'])
update.set(awaited=False)
update.execute()
+ else:
+ logger.warning('taskSetWait called on empty task list by parent: %s',
parent)
def taskWaitCheck(self,parent):
--
2.1.0
Show replies by thread
---
builder/kojid | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/builder/kojid b/builder/kojid
index 8851b0e..4b20e87 100755
--- a/builder/kojid
+++ b/builder/kojid
@@ -4259,18 +4259,23 @@ class NewRepoTask(BaseTaskHandler):
label=arch,
parent=self.id,
arch='noarch')
- # wait for subtasks to finish
- results = self.wait(subtasks.values(), all=True, failany=True)
+
+ # gather subtask results
data = {}
- for (arch, task_id) in subtasks.iteritems():
- data[arch] = results[task_id]
- self.logger.debug("DEBUG: %r : %r " % (arch,data[arch],))
+ if subtasks:
+ results = self.wait(subtasks.values(), all=True, failany=True)
+ for (arch, task_id) in subtasks.iteritems():
+ data[arch] = results[task_id]
+ self.logger.debug("DEBUG: %r : %r " % (arch,data[arch],))
+
+ # finalize
kwargs = {}
if event is not None:
kwargs['expire'] = True
self.session.host.repoDone(repo_id, data, **kwargs)
return repo_id, event_id
+
class CreaterepoTask(BaseTaskHandler):
Methods = ['createrepo']
--
2.1.0