removeQueue: Remove doRedis work queues.

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/doRedis.R

Description

Use the removeQueue function to delete one or more doRedis work queues.

Usage

1
removeQueue(queue)

Arguments

queue

A character work queue name or vector or list of queue names.

Details

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.

Value

TRUE is returned if the queues were successfully deleted, FALSE and probably an error condition otherwise.

Note

All doRedis functions require network access to a Redis server (not included with the doRedis package).

Author(s)

B. W. Lewis <blewis@illposed.net>

See Also

registerDoRedis

Examples

 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)

cloudcell/doRedis111stable documentation built on May 13, 2019, 8:02 p.m.