rush_plan: Create Rush Plan

View source: R/rush_plan.R

rush_planR Documentation

Create Rush Plan

Description

Stores the number of workers and Redis configuration options (redux::redis_config) for Rush. The function tests the connection to Redis and throws an error if the connection fails.

Usage

rush_plan(
  n_workers = NULL,
  config = NULL,
  lgr_thresholds = NULL,
  large_objects_path = NULL,
  start_worker_timeout = Inf
)

Arguments

n_workers

(integer(1))
Number of workers to be started.

config

(redux::redis_config)
Configuration options used to connect to Redis. If NULL, the REDIS_URL environment variable is parsed. If REDIS_URL is not set, a default configuration is used. See redux::redis_config for details.

lgr_thresholds

(named character() | named numeric())
Logger threshold on the workers e.g. c(rush = "debug").

large_objects_path

(character(1))
The path to the directory where large objects are stored.

start_worker_timeout

(numeric(1))
The time in seconds to wait for a worker to start.

Value

list() with the stored configuration.

Examples

# This example is not executed since Redis must be installed

   config_local = redux::redis_config()
   rush_plan(config = config_local, n_workers = 2)

   rush = rsh(network_id = "test_network")
   rush


rush documentation built on Sept. 11, 2024, 9:15 p.m.