A thin wrapper around tmuxRunWorkerLoop that optionally redirects console output to a log file before entering the job loop. Used internally by experimentFuture for remote (cluster) workers. Local workers use callr::r_bg() and do not need this wrapper.

runWorkerLoopFuture(
  queue_path,
  global_path,
  on_interrupt = c("requeue", "fail"),
  ss_id = NULL,
  email = NULL,
  cache_path = NULL,
  runNameLabel = quote(colnames(q)[1:2]),
  activeRunningPath = NULL,
  dots_path = NULL,
  stop_file = NULL,
  log_file = NULL
)

Arguments

queue_path

Path to the local RDS queue file.

global_path

Path to the R script sourced for each job.

on_interrupt

"requeue" or "fail".

ss_id

Google Sheets ID for the shared queue (or NULL for file-based queue).

email

Gargle OAuth e-mail.

cache_path

Gargle OAuth cache directory.

runNameLabel

Quoted expression for deriving a run name.

activeRunningPath

Directory for Running_*.rds marker files.

dots_path

Path to an RDS file whose contents are loaded into .GlobalEnv before sourcing global_path.

stop_file

Path to a sentinel file. When this file is created (e.g. by killExperimentFuture), the worker exits cleanly after its current job finishes.

log_file

Path to the log file for this worker. If NULL, output goes to the current connection.

Value

Invisibly returns the worker identifier string.