Scans the simulation output directories (defined by runNameLabel) to assess current status based on file timestamps and visual content of PNGs. If a PNG has not been updated for a specified timeout, the task is marked as "FINISHED" (if red pixels are detected) or "INTERRUPTED" (if no red is detected).

tmuxRefreshQueueStatus(
  queue_path,
  timeout_min = 20,
  runNameLabel = quote(colnames(q)[1:2]),
  statusCalculate = getOption("spades.statusCalculate"),
  folderWithIterInFilename = getOption("spades.folderWithIterInFilename"),
  recheckDone = FALSE,
  activeRunningPath = getOption("spades.activeRunningPath"),
  ...
)

Arguments

queue_path

Character. Absolute path to the experiment_queue.rds file.

timeout_min

Numeric. Minutes of inactivity before a task is considered stale. Defaults to 20.

runNameLabel

A quoted expression to derive a run label from the queue. Default uses first two columns.

statusCalculate

A quoted expression to compute job status from output files. Defaults to getOption("spades.statusCalculate", NULL).

folderWithIterInFilename

A quoted expression for a folder with iteration info in filenames. Defaults to getOption("spades.folderWithIterInFilename", NULL).

recheckDone

Logical. If TRUE, re-evaluate DONE status. Default FALSE.

activeRunningPath

Directory for "running" flag files. See tmuxActiveRunningPath.

...

Additional arguments (currently unused).

Value

A data.frame (the updated queue), invisibly. As a side effect, updates the RDS file on disk.

Examples

if (FALSE) { # \dontrun{
# Assessment of all simulations in the current project
tmuxRefreshQueueStatus("experiment_queue.rds", timeout_min = 30)
} # }