Description Usage Arguments Usage Details Examples
The Rworker object consumes messages sent to the message broker and sends tasks to be executed in background by the process pool.
1 2 3 4 5 6 |
name |
The name of the message queue. |
workers |
The number of background worker processes. |
queue |
A url string of type "provider://host:port". |
backend |
A url string of type "provider://host:port". |
1 | rwork <- rworker()
|
$new() creates new Rworker instance. Process pool is started and Queue
connection is established during instantiation.
$start_pool() starts all processes in the background process pool
$kill_pool() kills all processes in the background process pool
$pool processes list
$task() registers function as task to be remotelly executed
$tasks list of registered tasks
$consume() listens for message broker messages and send them to be executed
by the worker process pool
$execute() method used to send tasks and arguments for background execution
$update_state() method used to gather tasks execution status from worker pool
register_backend() registers results backend
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.