RedisFuture: A Redis-based future task queue implementation

View source: R/RedisFuture-class.R

RedisFutureR Documentation

A Redis-based future task queue implementation

Description

Set up the future parameters.

Usage

RedisFuture(
  expr = NULL,
  substitute = TRUE,
  globals = TRUE,
  packages = NULL,
  envir = parent.frame(),
  lazy = FALSE,
  queue = getOption("future.redis.queue", "{{session}}"),
  config = redis_config(),
  output_queue = NA,
  max_retries = 3,
  ...
)

Arguments

expr

An R expression.

substitute

If TRUE, argument expr is substitute():ed, otherwise not.

globals

(optional) a logical, a character vector, a named list, or a [globals::Globals] object. If 'TRUE', globals are identified by code inspection based on 'expr' and 'tweak' searching from environment 'envir'. If 'FALSE', no globals are used. If a character vector, then globals are identified by lookup based their names 'globals' searching from environment 'envir'. If a named list or a Globals object, the globals are used as is.

packages

(optional) R packages to load on worker processes.

envir

The environment from where global objects should be identified.

lazy

logical value, if TRUE then delay submitting the task associated with the future to the associated task queue in Redis until the future status is polled or its value is requested.

queue

Redis key name of the task queue (Redis list).

config

Redis config.

output_queue

(optional) Redis key name of the work output queue (note: reserved for future use).

max_retries

Maximum number of times the future can be re-submitted to the task queue in the event of failure.

...

Additional named elements of the future.

Value

An object of class 'RedisFuture'.


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