Skip to content

Commit 6c51a53

Browse files
Merge pull request #565
Avoid empty VCF on death of all workers
2 parents 8a017b2 + 9b4a20d commit 6c51a53

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/sniffles/sniffles

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,11 @@ def Sniffles2_Main(processes: list[parallel.SnifflesWorker]):
503503
log.info(f"Took {time.monotonic() - analysis_start_time:.2f}s.")
504504
log.info("")
505505

506+
# It is possible that workers have all exited without finishing all work
507+
# Check the tasks deque is actually empty and explode accordingly if not
508+
if len(tasks) > 0:
509+
util.fatal_error_main("All workers have exited but work remains to be done, it is possible that all workers have been killed by your system due to memory constraints.")
510+
506511
finished_tasks.sort(key=lambda task: task.id)
507512

508513
for t in finished_tasks:

0 commit comments

Comments
 (0)