From 37f9e7a5c5b37bef2a4339d5cab07af3b56079ab Mon Sep 17 00:00:00 2001 From: aho Date: Fri, 1 Dec 2023 14:59:13 +0100 Subject: [PATCH] Correct the update code --- R/Collect.R | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/R/Collect.R b/R/Collect.R index 6d752f5..62e105e 100644 --- a/R/Collect.R +++ b/R/Collect.R @@ -386,19 +386,18 @@ Collect_autosubmit <- function(startr_exec, wait = TRUE, remove = TRUE) { run_dir <- startr_exec$cluster[['run_dir']] done <- FALSE - sum_received_chunks <- sum(grepl('.*\\.Rds$', list.files(remote_autosubmit_suite_dir_suite))) while (!done) { # If wait, try until it is done + sum_received_chunks <- sum(grepl('.*\\.Rds$', list.files(remote_autosubmit_suite_dir_suite))) if (sum_received_chunks / num_outputs == prod(unlist(chunks))) { done <- TRUE } else if (!wait) { stop("Computation in progress...") } else { - Sys.sleep(startr_exec$cluster[['polling_period']]) message("Computation in progress, ", sum_received_chunks, " of ", prod(unlist(chunks)), " chunks are done...\n", "Check status on Autosubmit GUI: https://earth.bsc.es/autosubmitapp/experiment/", suite_id) -# Sys.sleep(min(sqrt(attempt), 5)) + Sys.sleep(startr_exec$cluster[['polling_period']]) } } # while !done -- GitLab