View source: R/worker_config.R
rrq_worker_config | R Documentation |
Create a worker configuration, suitable to pass into rrq_worker_config_save. The results of this function should not be modified.
rrq_worker_config(
queue = NULL,
verbose = TRUE,
logdir = NULL,
poll_queue = NULL,
timeout_idle = Inf,
poll_process = 1,
timeout_process_die = 2,
heartbeat_period = NULL,
offload_threshold_size = Inf
)
queue |
Optional character vector of queues to listen on for
tasks. There is a default queue which is always listened on
(called 'default'). You can specify additional names here and
tasks put onto these queues with |
verbose |
Logical, indicating if the worker should print logging output to the screen. Logging to screen has a small but measurable performance cost, and if you will not collect system logs from the worker then it is wasted time. Logging to the redis server is always enabled. |
logdir |
Optional log directory to use for writing logs when
queuing tasks in a separate process. If given, then logs will
be saved to |
poll_queue |
Polling time for new tasks on the queue or messages. Longer values here will reduce the impact on the database but make workers less responsive to being killed with an interrupt (control-C or Escape). The default should be good for most uses, but shorter values are used for debugging. Importantly, longer times here do not increase the time taken for a worker to detect new tasks. |
timeout_idle |
Optional timeout that sets the length of time
after which the worker will exit if it has not processed a task.
This is (roughly) equivalent to issuing a |
poll_process |
Polling time indicating how long to wait for a
background process to produce stdout or stderr. Only used for
tasks queued with |
timeout_process_die |
Timeout indicating how long to wait
wait for the background process to respond to SIGTERM, either as
we stop a worker or cancel a task. Only used for tasks queued
with |
heartbeat_period |
Optional period for the heartbeat. If
non-NULL then a heartbeat process will be started (using
|
offload_threshold_size |
The object size beyond which task results are
offloaded to disk instead of being stored in Redis. See
|
A list of values with class rrq_worker_config
; these
should be considered read-only, and contain only the validated
input parameters.
rrq::rrq_worker_config()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.