Skip to content

Commit 3704d1b

Browse files
Add a bit more debug info around batchtools::waitForJobs() call
1 parent 84cabe9 commit 3704d1b

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
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-9964
2+
Version: 0.12.2-9965
33
Depends:
44
R (>= 3.2.0),
55
parallelly,

R/BatchtoolsFutureBackend-class.R

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,9 +766,17 @@ await <- function(future, cleanup = TRUE, ...) {
766766
## Sleep function - increases geometrically as a function of iterations
767767
sleep_fcn <- function(i) delta * alpha ^ (i - 1)
768768

769+
if (debug) mdebugf_push("batchtools::waitForJobs(..., timeout = %s) ...", timeout)
769770
res <- waitForJobs(ids = jobid, timeout = timeout, sleep = sleep_fcn,
770771
stop.on.error = FALSE, reg = reg)
771-
if (debug) mdebugf("batchtools::waitForJobs(): %s", res)
772+
if (!isTRUE(res)) {
773+
warning(FutureWarning(sprintf("batchtools::waitForJobs(..., timeout = %s) returned FALSE", timeout), future = future))
774+
}
775+
if (debug) {
776+
mdebugf("Result: %s", res)
777+
mdebugf_pop()
778+
}
779+
772780
stat <- status(future)
773781
if (debug) {
774782
mdebugf("status(): %s", paste(sQuote(stat), collapse = ", "))

0 commit comments

Comments
 (0)