Skip to content

Commit c2da840

Browse files
Handle when a terminated job does not have a log file
1 parent 39baa87 commit c2da840

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: future.batchtools
2-
Version: 0.12.2-9925
2+
Version: 0.12.2-9926
33
Depends:
44
R (>= 3.2.0),
55
parallelly,

R/BatchtoolsFutureBackend-class.R

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -800,10 +800,12 @@ await <- function(future, cleanup = TRUE, ...) {
800800
## started jobs have a 'submitted' or 'started' status flag too,
801801
## whereas jobs that failed to launch won't. /HB 2025-07-15
802802

803-
output <- loggedOutput(future)
804-
hint <- unlist(strsplit(output, split = "\n", fixed = TRUE))
805-
hint <- hint[nzchar(hint)]
806-
hint <- tail(hint, n = getOption("future.batchtools.expiration.tail", 48L))
803+
output <- tryCatch({
804+
loggedOutput(future)
805+
hint <- unlist(strsplit(output, split = "\n", fixed = TRUE))
806+
hint <- hint[nzchar(hint)]
807+
hint <- tail(hint, n = getOption("future.batchtools.expiration.tail", 48L))
808+
}, error = function(e) NULL)
807809
if (length(hint) > 0) {
808810
hint <- c("The last few lines of the logged output:", hint)
809811
hint <- paste(hint, collapse = "\n")

0 commit comments

Comments
 (0)