Description Usage Arguments Details Value Note Author(s) See Also Examples
Use the removeQueue function to delete one or more doRedis work queues.
1 | removeQueue(queue)
|
queue |
A character work queue name or vector or list of queue names. |
This action will terminate the worker loops running on any corresponding back-end workers. Upon termination the workers will clean up any ancillary Redis keys.
TRUE is returned if the queues were successfully deleted, FALSE and probably an error condition otherwise.
All doRedis functions require network access to a Redis server (not included with the doRedis package).
B. W. Lewis <blewis@illposed.net>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
# The example assumes that a Redis server is running on the local host
# and standard port.
# 1. Open one or more 'worker' R sessions and run:
require('doRedis')
redisWorker('jobs')
# We use the name 'jobs' to identify a work queue.
# 2. Open another R session acting as a 'master' and run this simple
# sampling approximation of pi:
require('doRedis')
registerDoRedis('jobs')
foreach(j=1:10,.combine=sum,.multicombine=TRUE) %dopar%
4*sum((runif(1000000)^2 + runif(1000000)^2)<1)/10000000
removeQueue('jobs')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.