Skip to content

Commit 74b36c6

Browse files
Add option 'future.batchtools.expiration.tail' and increase default from 6 to 48 lines [#32]
1 parent 07c26da commit 74b36c6

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

NEWS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ NEW FEATURES:
1313
* Setting option 'future.delete' to FALSE will now prevent removal of the
1414
batchtools registry folders.
1515

16+
* When a batchtools job expires, for instance when the scheduler terminates
17+
it because the job was running out of its allocated resources, then a
18+
BatchtoolsFutureError is produced which by default outputs the tail of the
19+
output logged by batchtools. The default number of lines displayed from
20+
the end is now increased to from six to 48 - a number which now can be set
21+
via option 'future.batchtools.expiration.tail'.
22+
1623
BUG FIXES:
1724

1825
* Argument 'workers' could not be a function.

R/BatchtoolsFuture-class.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,11 +512,11 @@ await.BatchtoolsFuture <- function(future, cleanup = TRUE,
512512
output <- loggedOutput(future)
513513
hint <- unlist(strsplit(output, split = "\n", fixed = TRUE))
514514
hint <- hint[nzchar(hint)]
515-
hint <- tail(hint, n = 6L)
515+
hint <- tail(hint, n = getOption("future.batchtools.expiration.tail", 48L))
516516
if (length(hint) > 0) {
517517
hint <- paste(hint, collapse = "\n")
518-
msg <- sprintf("%s. The last few lines of the logged output:\n%s",
519-
msg, hint)
518+
msg <- paste(msg, ". The last few lines of the logged output:\n",
519+
hint, sep="")
520520
} else {
521521
msg <- sprintf("%s. No logged output exist.", msg)
522522
}

0 commit comments

Comments
 (0)