Merge #564 Fix fedmsg issue on Copr

This commit is contained in:
Jan Kaluža
2017-05-22 19:43:26 +00:00
3 changed files with 4 additions and 12 deletions

View File

@@ -282,8 +282,3 @@ def wait(config, session, msg):
# other backends need this implemented (e.g. COPR)
return [module_build_service.messaging.KojiRepoChange(
'fake msg', builder.module_build_tag['name'])]
# We don't have copr implementation finished yet, Let's fake the repo change event,
# as if copr builds finished successfully
if config.system == "copr":
return [module_build_service.messaging.KojiRepoChange('fake msg', build.koji_tag)]

View File

@@ -121,12 +121,6 @@ def done(config, session, msg):
further_work += start_next_batch_build(
config, module_build, session, builder)
# We don't have copr implementation finished yet, Let's fake the repo change event,
# as if copr builds finished successfully
if config.system == "copr":
further_work += [module_build_service.messaging.KojiRepoChange('fake msg', module_build.koji_tag)]
return further_work
else:
if has_failed_components:
module_build.transition(config, state=models.BUILD_STATES['failed'],

View File

@@ -174,7 +174,10 @@ def continue_batch_build(config, module, session, builder, components=None):
components_to_build.append(c)
# Start build of components in this batch.
with concurrent.futures.ThreadPoolExecutor(max_workers=config.num_consecutive_builds) as executor:
max_workers = 1
if config.num_consecutive_builds > 0:
max_workers = config.num_consecutive_builds
with concurrent.futures.ThreadPoolExecutor(max_workers=max_workers) as executor:
futures = {executor.submit(start_build_component, builder, c): c for c in components_to_build}
concurrent.futures.wait(futures)