start_worker {rush} | R Documentation |
Start a worker
Description
Starts a worker.
The function loads the globals and packages, initializes the RushWorker instance and invokes the worker loop.
This function is called by $start_local_workers()
or by the user after creating the worker script with $create_worker_script()
.
Use with caution.
The global environment is changed.
Usage
start_worker(network_id, worker_id = NULL, remote = TRUE, ...)
Arguments
network_id |
( |
worker_id |
( |
remote |
( |
... |
( |
Value
NULL
Note
The function initializes the connection to the Redis data base. It loads the packages and copies the globals to the global environment of the worker. The function initialize the RushWorker instance and starts the worker loop.
Examples
# This example is not executed since Redis must be installed
## Not run:
rush::start_worker(
network_id = 'test-rush',
remote = TRUE,
url = 'redis://127.0.0.1:6379',
scheme = 'redis',
host = '127.0.0.1',
port = '6379')
## End(Not run)