Skip to content

Commit

Permalink
change devices into eager_devices. still unsure about the lazy property
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-dot committed Jul 8, 2024
1 parent e5bd60b commit d5f35d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/blueapi/core/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ def with_dodal_module(self, module: ModuleType, **kwargs) -> None:
devices, exceptions = make_all_devices(module, **kwargs)

# for non-lazy devices, we instantiate them
early_devices = devices.items().filter(lambda x: not x.lazy)
# eager_devices = devices.items().filter(lambda x: not x.lazy)
eager_devices = {k: v for k, v in devices.items() if not v.lazy}

for device in early_devices.values():
for device in eager_devices.values():
self.register_device(device)

# If exceptions have occurred, we log them but we do not make blueapi
Expand Down

0 comments on commit d5f35d1

Please sign in to comment.