Skip to contents

Function to construct a Rush controller.

Usage

rsh(network_id = NULL, config = NULL, seed = NULL, ...)

Arguments

network_id

(character(1))
Identifier of the rush network. Controller and workers must have the same instance id. Keys in Redis are prefixed with the instance id.

config

(redux::redis_config)
Redis configuration options. If NULL, configuration set by rush_plan() is used. If rush_plan() has not been called, the REDIS_URL environment variable is parsed. If REDIS_URL is not set, a default configuration is used. See redux::redis_config for details.

seed

(integer())
Initial seed for the random number generator. Either a L'Ecuyer-CMRG seed (integer(7)) or a regular RNG seed (integer(1)). The later is converted to a L'Ecuyer-CMRG seed. If NULL, no seed is used for the random number generator.

...

(ignored).

Value

Rush controller.

Examples

# This example is not executed since Redis must be installed
# \donttest{
   config_local = redux::redis_config()
   rush = rsh(network_id = "test_network", config = config_local)
   rush
#> <Rush>
#> * Running Workers: 0
#> * Queued Tasks: 0
#> * Queued Priority Tasks: 0
#> * Running Tasks: 0
#> * Finished Tasks: 0
#> * Failed Tasks: 0
# }