Skip to content

Commit

Permalink
rename is_transferred function
Browse files Browse the repository at this point in the history
  • Loading branch information
ssjunnebo committed Sep 16, 2024
1 parent 2640328 commit 3be5484
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions taca/analysis/analysis_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def _process(run):
run.update_statusdb()
return
elif sequencing_done and demultiplexing_status == "finished":
if not run.is_transferred() and not run.transfer_ongoing() and not run.rsync_complete():
if not run.in_transfer_log() and not run.transfer_ongoing() and not run.rsync_complete():
run.aggregate_demux_results() # TODO: if multiple demux dirs, aggregate the results into Demultiplexing?
run.sync_metadata()
run.make_transfer_indicator()
Expand All @@ -87,7 +87,7 @@ def _process(run):
run.update_statusdb()
logger.info(f"{run} is being transferred. Skipping.")
return
elif run.rsync_complete() and not run.is_transferred():
elif run.rsync_complete() and not run.in_transfer_log():
if run.rsync_success():
run.remove_transfer_indicator()
run.update_transfer_log()
Expand All @@ -102,7 +102,7 @@ def _process(run):
run.status = "transfer failed"
logger.warning(f"An issue occurred while transfering {run} to the analysis cluster." )
# TODO: email warning to operator
elif run.is_transferred():
elif run.in_transfer_log():
logger.warning(
f"The run {run} has already been transferred but has not been archived. Please investigate"
)
Expand Down
2 changes: 1 addition & 1 deletion taca/element/Element_Runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def start_demux(self, run_manifest, demux_dir):
f"started for run {self} on {datetime.now()}"
)

def is_transferred(self):
def in_transfer_log(self):
with open(self.transfer_file, 'r') as transfer_file:
for row in transfer_file.read():
if self.NGI_run_id in row:
Expand Down

0 comments on commit 3be5484

Please sign in to comment.