From f98cc708731a675fac9e5a7a0c1c7ec7aa7eccfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isak=20Ohlsson=20=C3=85ngnell?= <40887124+islean@users.noreply.github.com> Date: Tue, 31 Oct 2023 13:24:43 +0100 Subject: [PATCH] Missed pending decompression check (#2641) (patch) ### Fixed - We check for pending decompressions in the decompress flow. --- cg/meta/compress/compress.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cg/meta/compress/compress.py b/cg/meta/compress/compress.py index 8cf752ecee..27a7085d53 100644 --- a/cg/meta/compress/compress.py +++ b/cg/meta/compress/compress.py @@ -112,12 +112,19 @@ def decompress_spring(self, sample_id: str) -> bool: for compression in compressions: if not self.crunchy_api.is_spring_decompression_possible(compression_obj=compression): LOG.info(f"SPRING to FASTQ decompression not possible for {sample_id}") + if self.crunchy_api.is_compression_pending( + compression + ) or self.crunchy_api.is_spring_decompression_done(compression): + LOG.info( + f"Spring file {compression.spring_path.as_posix()} is already being decompressed." + ) + continue if not self.backup_api.is_to_be_retrieved_and_decrypted( spring_file_path=compression.spring_path ): LOG.warning(f"Could not find {compression.spring_path} on disk") return False - LOG.info("Until the SPRING file is retrieved from PDC and decrypted") + LOG.info("The SPRING file will be retrieved from PDC and decrypted") self.backup_api.retrieve_and_decrypt_spring_file( spring_file_path=Path(compression.spring_path) )