Learn R Programming

bakerrr (version 0.2.0)

bakerrr: S7 bakerrr class for job orchestration and background processing

Description

Defines the bakerrr S7 class for parallel and background job execution. Stores the function to run (fun), argument lists (args_list), background job arguments (bg_args), job objects, results, and runtime properties. Supports retrieval of job status/results and validation of provided properties.

Usage

bakerrr(
  fun,
  args_list,
  bg_args = list(),
  n_daemons = ceiling(parallel::detectCores()/5),
  cleanup = TRUE
)

Value

An S7 bakerrr class object with job orchestration methods and properties.

Arguments

fun

Function to be executed for each job.

args_list

List of argument sets for each job.

bg_args

List of arguments passed to background job handler.

n_daemons

Number of parallel workers (default: ceiling of cores/5).

cleanup

Logical; whether to clean up jobs after execution (default: TRUE).

Examples

Run this code
# Create a bakerrr object to process jobs in parallel
bakerrr::bakerrr(fun = sum, args_list = list(list(1:10), list(10:20)))

Run the code above in your browser using DataLab