Create an abstract cluster launcher object.
      Source: R/crew_launcher_cluster.R
      crew_launcher_cluster.RdCreate an R6 abstract cluster launcher object.
Usage
crew_launcher_cluster(
  name = NULL,
  workers = 1L,
  seconds_interval = 0.5,
  seconds_timeout = 60,
  seconds_launch = 86400,
  seconds_idle = 300,
  seconds_wall = Inf,
  tasks_max = Inf,
  tasks_timers = 0L,
  reset_globals = NULL,
  reset_packages = NULL,
  reset_options = NULL,
  garbage_collection = NULL,
  crashes_error = NULL,
  tls = crew::crew_tls(mode = "automatic"),
  r_arguments = c("--no-save", "--no-restore"),
  options_metrics = crew::crew_options_metrics(),
  options_cluster = crew.cluster::crew_options_cluster(),
  verbose = NULL,
  command_submit = NULL,
  command_terminate = NULL,
  command_delete = NULL,
  script_directory = NULL,
  script_lines = NULL
)Arguments
- name
 Character string, name of the launcher. If the name is
NULL, then a name is automatically generated when the launcher starts.- workers
 Maximum number of workers to run concurrently when auto-scaling, excluding task retries and manual calls to
launch(). Special workers allocated for task retries do not count towards this limit, so the number of workers running at a given time may exceed this maximum. A smaller number of workers may run if the number of executing tasks is smaller than the supplied value of theworkersargument.- seconds_interval
 Number of seconds between polling intervals waiting for certain internal synchronous operations to complete. In certain cases, exponential backoff is used with this argument passed to
seconds_maxin acrew_throttle()object.- seconds_timeout
 Number of seconds until timing out while waiting for certain synchronous operations to complete, such as checking
mirai::info().- seconds_launch
 Seconds of startup time to allow. A worker is unconditionally assumed to be alive from the moment of its launch until
seconds_launchseconds later. Afterseconds_launchseconds, the worker is only considered alive if it is actively connected to its assign websocket.- seconds_idle
 Maximum number of seconds that a worker can idle since the completion of the last task. If exceeded, the worker exits. But the timer does not launch until
tasks_timerstasks have completed. See theidletimeargument ofmirai::daemon().crewdoes not excel with perfectly transient workers because it does not micromanage the assignment of tasks to workers, so please allow enough idle time for a new worker to be delegated a new task.- seconds_wall
 Soft wall time in seconds. The timer does not launch until
tasks_timerstasks have completed. See thewalltimeargument ofmirai::daemon().- tasks_max
 Maximum number of tasks that a worker will do before exiting. Also determines how often the controller auto-scales. See the Auto-scaling section for details.
- tasks_timers
 Number of tasks to do before activating the timers for
seconds_idleandseconds_wall. See thetimerstartargument ofmirai::daemon().- reset_globals
 Deprecated on 2025-05-30 (
crewversion 1.1.2.9004). Please use thereset_globalsoption ofcrew_controller()instead.- reset_packages
 Deprecated on 2025-05-30 (
crewversion 1.1.2.9004). Please use thereset_packagesoption ofcrew_controller()instead.- reset_options
 Deprecated on 2025-05-30 (
crewversion 1.1.2.9004). Please use thereset_optionsoption ofcrew_controller()instead.- garbage_collection
 Deprecated on 2025-05-30 (
crewversion 1.1.2.9004). Please use thegarbage_collectionoption ofcrew_controller()instead.- crashes_error
 Deprecated on 2025-01-13 (
crewversion 0.10.2.9002).- tls
 A TLS configuration object from
crew_tls().- r_arguments
 Optional character vector of command line arguments to pass to
Rscript(non-Windows) orRscript.exe(Windows) when starting a worker. Example:r_arguments = c("--vanilla", "--max-connections=32").- options_metrics
 Either
NULLto opt out of resource metric logging for workers, or an object fromcrew_options_metrics()to enable and configure resource metric logging for workers. For resource logging to run, theautometricR package version 0.1.0 or higher must be installed.- options_cluster
 List of options from a
crew.clusteroptions function such ascrew_options_slurm(). Make sure the cluster types of the launcher and options function match.- verbose
 Deprecated. Use
options_clusterinstead.- command_submit
 Deprecated. Use
options_clusterinstead.- command_terminate
 Deprecated. Use
options_clusterinstead.- command_delete
 Deprecated on 2024-01-08 (version 0.1.4.9001). Use
command_terminateinstead.- script_directory
 Deprecated. Use
options_clusterinstead.- script_lines
 Deprecated. Use
options_clusterinstead.
Details
This abstract class is used to develop specific launcher classes for specific computing platforms.
Attribution
The template files at
https://github.com/mschubert/clustermq/tree/master/inst
informed the development of the crew launcher plugins in
crew.cluster, and we would like to thank
Michael Schubert for developing clustermq and releasing it under
the permissive Apache License 2.0.
See the NOTICE and README.md files in the crew.cluster
source code for additional attribution.
See also
Other cluster:
crew_class_launcher_cluster,
crew_class_monitor_cluster,
crew_monitor_cluster(),
crew_options_cluster()