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.
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.- worker_id
(
character(1)
)
Identifier of the worker. Keys in redis specific to the worker are prefixed with the worker id.- remote
(
logical(1)
)
Whether the worker is on a remote machine.- ...
(
any
)
Arguments passed to redux::redis_config.
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.