Spawn a worker in the background
worker_spawn(
obj,
n = 1,
logdir = NULL,
timeout = 600,
worker_config = "localhost",
worker_name_base = NULL,
time_poll = 1,
progress = NULL
)
worker_wait(obj, key_alive, timeout = 600, time_poll = 1, progress = NULL)
An rrq_controller
object
Number of workers to spawn
Path of a log directory to write the worker process log to, interpreted relative to the current working directory
Time to wait for workers to appear
Name of the configuration to use. By default
the "localhost"
configuration is used
Optional base to construct the worker names from. If omitted a random name will be used.
Polling period (in seconds) while waiting for workers to come up. Must be an integer, at least 1.
Show a progress bar while waiting for workers
(when timeout
is at least 0)
A key name (generated from
rrq_expect_worker
or worker_spawn
)
Spawning multiple workers. If n
is greater than one,
multiple workers will be spawned. This happens in parallel so it
does not take n times longer than spawning a single worker.
Beware that signals like Ctrl-C passed to this R instance can still propagate to the child processes and can result in them dying unexpectedly. It is probably safer to start processes in a completely separate session.