R/close_rselenium.R

Defines functions close_rselenium

Documented in close_rselenium

#' utility function that closes all parallel instances of RSelenium
#'
#' @param clust \code{parallel} cluster
#' @return No return value, called to close RSelenium instances in parscrape.
#' @keywords internal

close_rselenium <- function(clust) {
  parallel::clusterEvalQ(clust, function(){
    remDr$close()
    rD$server$stop()
  })
  system("taskkill /im java.exe /f", intern = FALSE, ignore.stdout = FALSE)
}

Try the parsel package in your browser

Any scripts or data that you put into this service are public.

parsel documentation built on March 7, 2023, 6:41 p.m.