worker: Start a Redis worker process loop

View source: R/worker.R

workerR Documentation

Start a Redis worker process loop

Description

The worker process blocks for tasks on the specified queue (a Redis list). The worker continues to process tasks from the queue untile the queue liveness key is removed (see removeQ), the number of processed tasks reaches the iter limit, or until a Redis communication or other error occurs; after which the worker exits (quits R).

Usage

worker(
  queue = getOption("future.redis.queue", "{{session}}"),
  linger = 10,
  config = redis_config(),
  iter = Inf,
  quit = FALSE,
  log = NULL
)

Arguments

queue

Redis task queue name.

linger

in seconds, max time before system checks (including termination).

config

Redis configuration (see redis_config)).

iter

Maximum number of tasks to acquire before exiting.

quit

if TRUE, quit R on exit.

log

divert stdout and messages to log file.

Value

After conclusion of the worker loop, either R exits or NULL is silently returned.


bwlewis/future.redis documentation built on May 12, 2023, 1:52 a.m.