start_worker | R Documentation |
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.
start_worker(network_id, worker_id = NULL, remote = TRUE, ...)
network_id |
( |
worker_id |
( |
remote |
( |
... |
( |
NULL
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.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.