| testJob {BatchJobs} | R Documentation |
Tests a job by running it with Rscript in a new process.
Description
Useful for debugging.
Note that neither the registry, database or file directory are changed.
Usage
testJob(reg, id, resources = list(), external = TRUE)
Arguments
reg |
[Registry]
Registry.
|
id |
[integer(1)]
Id of job to test.
Default is first job id of registry.
|
external |
[logical(1)]
Run test in an independent external R session instead of current.
The former allows to uncover missing variable definitions (which may
accidentially be defined in the current global environment) and the latter
is useful to get traceable execeptions.
Default is TRUE.
|
resources |
[list]
Usually not needed, unless you call the function getResources in your job.
See submitJobs.
Default is empty list.
|
Value
[any]. Result of job. If the job did not complete because of an error, NULL is returned.
See Also
reduceResults
Examples
reg = makeRegistry(id = "BatchJobsExample", file.dir = tempfile(), seed = 123)
f = function(x) if (x==1) stop("oops") else x
batchMap(reg, f, 1:2)
testJob(reg, 2)
[Package
BatchJobs version 1.3
Index]