Create a new controller. This is the new interface that will
replace rrq_controller soon, at which point it will rename back
to rrq_controller
.
rrq_controller2(
queue_id,
con = redux::hiredis(),
timeout_task_wait = NULL,
follow = NULL,
check_version = TRUE
)
An identifier for the queue. This will prefix all
keys in redis, so a prefix might be useful here depending on
your use case (e.g. rrq:<user>:<id>
)
A redis connection. The default tries to create a redis
connection using default ports, or environment variables set as in
redux::hiredis()
An optional default timeout to use when
waiting for tasks with rrq_task_wait. If not given, then we
fall back on the global option rrq.timeout_task_wait
, and if
that is not set, we wait forever (i.e., timeout_task_wait = Inf
).
An optional default logical to use for tasks
that may (or may not) be retried. If not given we fall back
on the global option rrq.follow
, and if that is not set then
TRUE
(i.e., we do follow). The value follow = TRUE
is
potentially slower than follow = FALSE
for some operations
because we need to dereference every task id. If you never use
rrq_task_retry then this dereference never has an effect and we
can skip it. See vignette("fault-tolerance")
for more
information.
Logical, indicating if we should check the
schema version. You can pass FALSE
here to continue even
where the schema version is incompatible, though any subsequent
actions may lead to corruption.
An rrq_controller2
object, which is opaque.