Skip to content

Commit

Permalink
build: defer initialization of Eventloop
Browse files Browse the repository at this point in the history
If layers are updated before building a eventloop inside the layer-class
is used. Once this completes it would reset the asyncio event loop for
this task and this resting the event loop from the builder. Avoid this
by defer the initialization of the Eventloop for build.
  • Loading branch information
rhubert committed Jun 3, 2024
1 parent 597c767 commit 4c95e3f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions pym/bob/cmds/build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,16 +218,16 @@ def _downloadLayerArgument(arg):

startTime = time.time()

with EventLoopWrapper() as (loop, executor):
recipes = RecipeSet()
recipes.defineHook('releaseNameFormatter', LocalBuilder.releaseNameFormatter)
recipes.defineHook('developNameFormatter', LocalBuilder.developNameFormatter)
recipes.defineHook('developNamePersister', None)
recipes.setConfigFiles(args.configFile)
# FIXME: document: build-mode setting from default.yaml won't override this..
recipes.setUpdateLayers(args.build_mode != 'build-only')
recipes.parse(defines)
recipes = RecipeSet()
recipes.defineHook('releaseNameFormatter', LocalBuilder.releaseNameFormatter)
recipes.defineHook('developNameFormatter', LocalBuilder.developNameFormatter)
recipes.defineHook('developNamePersister', None)
recipes.setConfigFiles(args.configFile)
# FIXME: document: build-mode setting from default.yaml won't override this..
recipes.setUpdateLayers(args.build_mode != 'build-only')
recipes.parse(defines)

with EventLoopWrapper() as (loop, executor):
# if arguments are not passed on cmdline use them from default.yaml or set to default yalue
if develop:
cfg = recipes.getCommandConfig().get('dev', {})
Expand Down

0 comments on commit 4c95e3f

Please sign in to comment.