Skip to content

Commit 3540524

Browse files
Cleanup batchtools job folder on Future{Interrupt,Launch}Error [#95]
1 parent 92fcfc1 commit 3540524

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
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-9913
2+
Version: 0.12.2-9914
33
Depends:
44
R (>= 3.2.0),
55
parallelly,

R/BatchtoolsFutureBackend-class.R

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -800,26 +800,11 @@ await <- function(future, cleanup = TRUE, ...) {
800800

801801
if (any(c("submitted", "started") %in% stat)) {
802802
msg <- sprintf("Future (%s) of class %s expired, which indicates that it crashed or was killed. %s", label, class(future)[1], hint)
803-
stop(FutureInterruptError(msg, future = future))
803+
result <- FutureInterruptError(msg, future = future)
804804
} else {
805805
msg <- sprintf("Future (%s) of class %s failed to launch. %s", label, class(future)[1], hint)
806-
stop(FutureLaunchError(msg, future = future))
806+
result <- FutureLaunchError(msg, future = future)
807807
}
808-
809-
cleanup <- FALSE
810-
msg <- sprintf("BatchtoolsExpiration: Future ('%s') expired (registry path %s)", label, reg$file.dir)
811-
output <- loggedOutput(future)
812-
hint <- unlist(strsplit(output, split = "\n", fixed = TRUE))
813-
hint <- hint[nzchar(hint)]
814-
hint <- tail(hint, n = getOption("future.batchtools.expiration.tail", 48L))
815-
if (length(hint) > 0) {
816-
hint <- paste(hint, collapse = "\n")
817-
msg <- paste(msg, ". The last few lines of the logged output:\n",
818-
hint, sep="")
819-
} else {
820-
msg <- sprintf("%s. No logged output exist.", msg)
821-
}
822-
stop(BatchtoolsFutureError(msg, future = future))
823808
} else if (future[["state"]] %in% c("canceled", "interrupted")) {
824809
label <- sQuoteLabel(future)
825810
msg <- sprintf("Future (%s) of class %s was %s", label, class(future)[1], future[["state"]])

0 commit comments

Comments
 (0)