testJob: Tests a job by running it with Rscript in a new process.

Description Usage Arguments Value See Also Examples

Description

Useful for debugging. Note that neither the registry, database or file directory are changed.

Usage

1
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.

resources

[list]
Usually not needed, unless you call the function getResources in your job. See submitJobs. Default is empty list.

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.

Value

[any]. Result of job. If the job did not complete because of an error, NULL is returned.

See Also

Other debug: debugMulticore, debugSSH, getErrorMessages, getJobInfo, getLogFiles, grepLogs, killJobs, resetJobs, setJobFunction, showLog

Examples

1
2
3
4
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)

BatchJobs documentation built on May 15, 2019, 1:05 a.m.

Related to testJob in BatchJobs...