Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions src/murfey/client/watchdir_multigrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,22 @@ def _handle_metadata(self, directory: Path, extra_directory: str, limited=True):

def _handle_fractions(self, directory: Path):
processing_started = False
for d02 in directory.glob("Images-Disc*"):
if d02 not in self._seen_dirs:
self.notify(
d02,
remove_files=True,
analyse=self._analyse,
tag="fractions",
)
self._seen_dirs.append(d02)
processing_started = d02 in self._seen_dirs
if not processing_started:
if (
directory.is_dir()
and directory not in self._seen_dirs
and list(directory.iterdir())
):
if directory.is_dir() and directory not in self._seen_dirs:
# Check contents, and skip .gain files written by EPU
directory_children = [d for d in directory.iterdir() if d.suffix != ".gain"]
for d02 in directory_children:
# Transfer each Images-Disc folder as a separate rsyncer
if d02.name.startswith("Images-Disc") and d02 not in self._seen_dirs:
self.notify(
d02,
remove_files=True,
analyse=self._analyse,
tag="fractions",
)
self._seen_dirs.append(d02)
processing_started = d02 in self._seen_dirs
if not processing_started and directory_children:
# Tomography case of full directory transfer if no Images-Disc1
self.notify(
directory,
analyse=self._analyse,
Expand Down