Closed HenrikBengtsson closed 8 years ago
Implemented and works with the following toy example:
{hb}: Rscript -e "library(future.BatchJobs); plan(batchjobs); f %<-% { stop('woo') }; print(f)"
Loading required package: future
Loading required package: BatchJobs
Loading required package: BBmisc
Loading required package: methods
Error in Exception(...) :
BatchJobError: 'Error in tryCatchList(expr, classes, parentenv, handlers) : woo ' [DEBUG INFORMATION: BatchJobsFuture:; Expression:; {; stop("woo"); }; Status: 'error', 'started', 'submitted'; Error: 'Error in tryCatchList(expr, classes, parentenv, handlers) : woo '; BatchJobs configuration:; Job registry: BatchJobs_1159903939; Number of jobs: 1; Files dir: x:/future.BatchJobs/.future/20160429_162348-QJtsJh/BatchJobs_1159903939-files; Work dir: x:/future.BatchJobs; Multiple result files: FALSE; Seed: 910586702; Required packages: BatchJobs; Cluster functions: 'Local']
Calls: print ... value.BatchJobsFuture -> NextMethod -> value.Future
Execution halted
Warning message:
In delete.BatchJobsFuture(future, onRunning = "skip", onMissing = "ignore", :
Will not remove BatchJob registry, because the status of the BatchJobs was 'error' and option 'future.delete' is not set to FALSE: 'x:/future.BatchJobs/.future/20160429_162348-QJtsJh/BatchJobs_1159903939-files'Will not remove BatchJob registry, because the status of the BatchJobs was 'started' and option 'future.delete' is not set to FALSE: 'x:/future.BatchJobs/.future/20160429_162348-QJtsJh/BatchJobs_1159903939-files'Will not remove BatchJob registry, because the status of the BatchJobs was 'submitted' and option 'future.delete' is not set to FALSE: 'x:/future.BatchJobs/.future/20160429_162348-QJtsJh/BatchJobs_1159903939-files'
{hb}: dir "x:/future.BatchJobs/.future/20160429_162348-QJtsJh/BatchJobs_1159903939-files"
Volume in drive X is Windows7_OS
Volume Serial Number is E038-51CC
Directory of x:\future.BatchJobs\.future\20160429_162348-QJtsJh\BatchJobs_1159903939-files
04/29/2016 04:23 PM <DIR> .
04/29/2016 04:23 PM <DIR> ..
04/29/2016 04:23 PM 5,120 BatchJobs.db
04/29/2016 04:23 PM 972 conf.RData
04/29/2016 04:23 PM <DIR> exports
04/29/2016 04:23 PM <DIR> functions
04/29/2016 04:23 PM <DIR> jobs
04/29/2016 04:23 PM <DIR> pending
04/29/2016 04:23 PM 613 registry.RData
04/29/2016 04:23 PM <DIR> resources
3 File(s) 6,705 bytes
7 Dir(s) 8,725,270,528 bytes free
Background
When running script from the command line (e.g.
Rscript foo.R
) and that has one or more BatchJobs futures that fails due to expiration, there is little information do go buy after the main R session terminates (because futures are automagically cleaned up). All we have might be something like the following output:Suggestions
.out
file.