11# ' @inheritParams BatchtoolsTemplateFutureBackend
2+ # ' @inheritParams batchtools::makeClusterFunctions
3+ # '
24# ' @rdname BatchtoolsFutureBackend
35# ' @keywords internal
46# '
57# ' @export
68BatchtoolsBashFutureBackend <- function (... ,
7- cluster.functions = makeClusterFunctionsBash(template = template ),
9+ cluster.functions = makeClusterFunctionsBash(template = template , fs.latency = fs.latency ),
10+ fs.latency = 0.0 ,
811 template = " bash" ) {
912 assert_no_positional_args_but_first()
1013
@@ -63,13 +66,14 @@ BatchtoolsBashFutureBackend <- function(...,
6366# '
6467# ' @export
6568batchtools_bash <- function (
66- cluster.functions = makeClusterFunctionsBash(template = " bash" ),
69+ ... ,
70+ cluster.functions = makeClusterFunctionsBash(template = " bash" , fs.latency = fs.latency ),
71+ fs.latency = 0.0 ,
6772 template = " bash" ,
6873 registry = list (),
6974 conf.file = findConfFile(),
7075 resources = list (),
71- finalize = getOption(" future.finalize" , TRUE ),
72- ... ) {
76+ finalize = getOption(" future.finalize" , TRUE )) {
7377 stop(" INTERNAL ERROR: The future.batchtools::batchtools_bash() must never be called directly" )
7478}
7579class(batchtools_bash ) <- c(
@@ -94,7 +98,7 @@ attr(batchtools_bash, "factory") <- BatchtoolsBashFutureBackend
9498# ' @importFrom batchtools cfReadBrewTemplate cfBrewTemplate makeClusterFunctions makeSubmitJobResult
9599# ' @importFrom utils file_test
96100# ' @export
97- makeClusterFunctionsBash <- function (template = " bash" ) {
101+ makeClusterFunctionsBash <- function (template = " bash" , fs.latency = 0.0 ) {
98102 bin <- Sys.which(" bash" )
99103 stop_if_not(file_test(" -f" , bin ), file_test(" -x" , bin ))
100104
@@ -128,7 +132,8 @@ makeClusterFunctionsBash <- function(template = "bash") {
128132 cf <- makeClusterFunctions(
129133 name = " Bash" ,
130134 submitJob = submitJob ,
131- store.job.collection = TRUE
135+ store.job.collection = TRUE ,
136+ fs.latency = fs.latency
132137 )
133138 attr(cf , " template" ) <- template
134139 attr(cf , " template_text" ) <- template_text
0 commit comments