diff --git a/api/repo_api.py b/api/repo_api.py index 718159c..fd20c80 100644 --- a/api/repo_api.py +++ b/api/repo_api.py @@ -444,7 +444,18 @@ def check_aux_files(image_file_path, job_id): while True: # Si faltan archivos auxiliares por crear, imprimimos un mensaje en la API: if not os.path.exists(f"{image_file_path}.size") or not os.path.exists(f"{image_file_path}.sum") or not os.path.exists(f"{image_file_path}.full.sum") or not os.path.exists(f"{image_file_path}.torrent") or not os.path.exists(f"{image_file_path}.info.checked"): - journal.send("Task in process (auxiliar files remaining)", PRIORITY=journal.LOG_INFO, SYSLOG_IDENTIFIER="ogrepo-api_DEBUG") + missing_files = [] + if not os.path.exists(f"{image_file_path}.size"): + missing_files.append(f"{image_file_path}.size") + if not os.path.exists(f"{image_file_path}.sum"): + missing_files.append(f"{image_file_path}.sum") + if not os.path.exists(f"{image_file_path}.full.sum"): + missing_files.append(f"{image_file_path}.full.sum") + if not os.path.exists(f"{image_file_path}.torrent"): + missing_files.append(f"{image_file_path}.torrent") + if not os.path.exists(f"{image_file_path}.info.checked"): + missing_files.append(f"{image_file_path}.info.checked") + journal.send(f"Task in process (auxiliar files remaining): {', '.join(missing_files)}", PRIORITY=journal.LOG_INFO, SYSLOG_IDENTIFIER="ogrepo-api_DEBUG") # Si ya se han creado todos los archivos auxiliares, imprimimos un mensaje en la API, respondemos a ogCore y salimos del bucle: else: journal.send("Task finalized (all auxilar files created)", PRIORITY=journal.LOG_INFO, SYSLOG_IDENTIFIER="ogrepo-api_DEBUG")