Skip to content

Commit cc8896a

Browse files
committed
Revert "Revert ordering of subscription"
This reverts commit c5c7b46.
1 parent 894fe83 commit cc8896a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/blueapi/core/context.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ def __post_init__(self, configuration: ApplicationConfig | None):
118118
if self.numtracker is not None:
119119
numtracker = self.numtracker
120120

121+
path_provider = StartDocumentPathProvider()
122+
set_path_provider(path_provider)
123+
self.run_engine.subscribe(path_provider.update_run, "start")
124+
121125
def _update_scan_num(md: dict[str, Any]) -> int:
122126
scan = numtracker.create_scan(
123127
md["instrument_session"], md["instrument"]
@@ -128,10 +132,6 @@ def _update_scan_num(md: dict[str, Any]) -> int:
128132

129133
self.run_engine.scan_id_source = _update_scan_num
130134

131-
path_provider = StartDocumentPathProvider()
132-
set_path_provider(path_provider)
133-
self.run_engine.subscribe(path_provider.update_run, "start")
134-
135135
self.with_config(configuration.env)
136136
if self.numtracker and not isinstance(
137137
get_path_provider(), StartDocumentPathProvider

0 commit comments

Comments
 (0)