Terminate mirai
dispatchers and/or crew
workers
which may be lingering from previous workloads.
crew_clean(
dispatchers = TRUE,
workers = TRUE,
user = Sys.getenv("USER"),
seconds_interval = 0.1,
seconds_timeout = 10,
verbose = TRUE
)
NULL
(invisibly). If verbose
is TRUE
, it does
print out a message for every terminated process.
Logical of length 1, whether to terminate dispatchers.
Logical of length 1, whether to terminate workers.
Character of length 1. Terminate dispatchers and/or workers associated with this user name.
Seconds to between polling intervals waiting for a process to exit.
Seconds to wait for a process to exit.
Logical of length 1, whether to print an informative message every time a process is terminated.
Behind the scenes, mirai
uses an external R process
called a "dispatcher" to send tasks to crew
workers.
This dispatcher usually shuts down when you terminate the controller
or quit your R session, but sometimes it lingers. Likewise,
sometimes crew
workers do not shut down on their own.
The crew_clean()
function searches the process table on your
local machine and manually terminates any mirai
dispatchers
and crew
workers associated with your user name (or the
user name you select in the user
argument.
Unfortunately, it cannot reach remote workers such as those
launched by a crew.cluster
controller.
Other user:
crew-package
,
crew_controller_group()
,
crew_controller_local()
,
crew_tls()
if (identical(Sys.getenv("CREW_EXAMPLES"), "true")) {
crew_clean()
}
Run the code above in your browser using DataLab