Skip to content

Commit

Permalink
Merge pull request #42 from PNNL-Comp-Mass-Spec/41-stop-cluster-when-…
Browse files Browse the repository at this point in the history
…function-exits-abnormally-pnnldmsutilsdownload_datasets_by_data_package

stop cluster when function exits abnormally
  • Loading branch information
vladpetyuk authored Mar 19, 2024
2 parents a224a4b + adfd78f commit 03dd760
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/PNNL_DMS_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ download_datasets_by_data_package <- function(data_package_num,
stop("Unknown OS type.")
}
multiproc_cl <- makeCluster(ncores)
on.exit(stopCluster(multiproc_cl))
pbwalk(X = pathToFile$Folder, FUN = file.copy, cl = multiproc_cl, to = copy_to)
tryCatch(stopCluster(multiproc_cl))
}


Expand Down

0 comments on commit 03dd760

Please sign in to comment.