| 1 |
## Comment: The below should be set automatically whenever the package is |
| 2 |
## loaded and 'R CMD check' runs. The below is added in case R is changed |
| 3 |
## in the future and we fail to detect 'R CMD check'. |
| 4 |
Sys.setenv(R_PARALLELLY_MAKENODEPSOCK_CONNECTTIMEOUT = 2 * 60) |
| 5 |
Sys.setenv(R_PARALLELLY_MAKENODEPSOCK_TIMEOUT = 2 * 60) |
| 6 |
Sys.setenv(R_PARALLELLY_MAKENODEPSOCK_SESSIONINFO_PKGS = TRUE) |
| 7 |
|
| 8 |
## Label PSOCK cluster workers (to help troubleshooting) |
| 9 |
test_script <- grep("[.]R$", commandArgs(), value = TRUE)[1] |
| 10 |
if (is.na(test_script)) test_script <- "UNKNOWN" |
| 11 |
worker_label <- sprintf("parallelly/tests/%s:%s:%s:%s", test_script, Sys.info()[["nodename"]], Sys.info()[["user"]], Sys.getpid()) |
| 12 |
Sys.setenv(R_PARALLELLY_MAKENODEPSOCK_RSCRIPT_LABEL = worker_label) |