Skip to content

Commit 051918b

Browse files
committed
Add Supervisor into metadata name for tomo-multi
1 parent dfeae6f commit 051918b

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/murfey/client/watchdir_multigrid.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ def stop(self):
5151
self.thread.join()
5252
log.debug("MultigridDirWatcher thread stop completed")
5353

54-
def _handle_metadata(self, directory: Path):
54+
def _handle_metadata(self, directory: Path, extra_directory: str):
5555
self.notify(
5656
directory,
57-
extra_directory=f"metadata_{directory.name}",
57+
extra_directory=extra_directory,
5858
include_mid_path=False,
5959
analyse=self._analyse,
6060
limited=True,
@@ -130,7 +130,10 @@ def _process(self):
130130
for sample in sample_dirs:
131131
if len(list(sample.glob("*.mdoc"))):
132132
if sample not in self._seen_dirs:
133-
self._handle_metadata(sample)
133+
self._handle_metadata(
134+
sample,
135+
extra_directory=f"metadata_{sample.parent.name}_{sample.name}",
136+
)
134137
self._handle_fractions(
135138
sample.parent.parent.parent
136139
/ f"{sample.parent.name}_{sample.name}",
@@ -139,7 +142,9 @@ def _process(self):
139142

140143
else:
141144
if d.is_dir() and d not in self._seen_dirs:
142-
self._handle_metadata(d)
145+
self._handle_metadata(
146+
d, extra_directory=f"metadata_{d.name}"
147+
)
143148
self._handle_fractions(d.parent.parent / d.name, first_loop)
144149

145150
if first_loop:

0 commit comments

Comments
 (0)