R/tmux.R
tmuxRunNextWorker.RdRun one queued job (claim-next semantics) in the current R session.
tmuxRunNextWorker(
queue_path,
global_path,
on_interrupt = c("requeue", "fail"),
heartbeat_interval_s = 60,
runNameLabel = quote(colnames(q)[1:2]),
statusCalculate = getOption("spades.statusCalculate"),
folderWithIterInFilename = getOption("spades.folderWithIterInFilename"),
activeRunningPath = getOption("spades.activeRunningPath"),
ss_id = NULL
)character; path to the queue .rds
character; script to source for the job
"requeue" or "fail". If the sourced script is interrupted, either requeue or mark as FAILED.
numeric; seconds between heartbeats while the job runs
A quoted expression (possibly of q, which is the result of q <- readRDS(queue_path)).
Default is the first 2 column names of q. These will be concatenated and used as
labels for various things including the activeRunningPath file(s).
A quoted expression to compute job status from output files.
Defaults to getOption("spades.statusCalculate", NULL).
A quoted expression for a folder containing iteration
info in filenames. Defaults to getOption("spades.folderWithIterInFilename", NULL).
Directory for "running" flag files. See tmuxActiveRunningPath.
Optional Google Sheets/Drive ID for the shared queue. When supplied workers use the GS backend instead of the local RDS file.
"ok" | "interrupt" | "empty" (if no pending work found); used by tmuxRunWorkerLoop()