Create an R6 wrapper object to manage the mirai client.
Usage
crew_client(
name = NULL,
workers = NULL,
host = NULL,
port = NULL,
serialization = NULL,
profile = crew::crew_random_name(),
tls = crew::crew_tls(),
tls_enable = NULL,
tls_config = NULL,
seconds_interval = 0.25,
seconds_timeout = 60,
retry_tasks = NULL
)Arguments
- name
Deprecated on 2025-01-14 (
crewversion 0.10.2.9002).- workers
Deprecated on 2025-01-13 (
crewversion 0.10.2.9002).- host
IP address of the
miraiclient to send and receive tasks. IfNULL, the host defaults tonanonext::ip_addr()[1].- port
TCP port to listen for the workers. If
NULL, then an available ephemeral port is automatically chosen. Controllers running simultaneously on the same computer (as in a controller group) must not share the same TCP port.- serialization
Either
NULL(default) or an object produced bymirai::serial_config()to control the serialization of data sent to workers. This can help with either more efficient data transfers or to preserve attributes of otherwise non-exportable objects (such astorchtensors orarrowtables). See?mirai::serial_configfor details.- profile
Character string, compute profile for
mirai::daemons().- tls
A TLS configuration object from
crew_tls().- tls_enable
Deprecated on 2023-09-15 in version 0.4.1. Use argument
tlsinstead.- tls_config
Deprecated on 2023-09-15 in version 0.4.1. Use argument
tlsinstead.- seconds_interval
Number of seconds between polling intervals waiting for certain internal synchronous operations to complete, such as checking
mirai::info()- seconds_timeout
Number of seconds until timing out while waiting for certain synchronous operations to complete, such as checking
mirai::info().- retry_tasks
Deprecated on 2025-01-13 (
crewversion 0.10.2.9002).
See also
Other client:
crew_class_client
Examples
if (identical(Sys.getenv("CREW_EXAMPLES"), "true")) {
client <- crew_client()
client$start()
client$summary()
client$terminate()
}