Skip to content

Commit

Permalink
print session info from workers
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Sep 9, 2024
1 parent 8130c04 commit 61292de
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Description: In computationally demanding analysis projects,
'clustermq' by Schubert (2019) <doi:10.1093/bioinformatics/btz284>),
and 'batchtools' by Lang, Bischel, and Surmann (2017)
<doi:10.21105/joss.00135>.
Version: 0.9.5.9009
Version: 0.9.5.9010
License: MIT + file LICENSE
URL: https://wlandau.github.io/crew/, https://github.com/wlandau/crew
BugReports: https://github.com/wlandau/crew/issues
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ importFrom(tools,SIGINT)
importFrom(tools,SIGQUIT)
importFrom(tools,SIGTERM)
importFrom(tools,pskill)
importFrom(utils,capture.output)
importFrom(utils,compareVersion)
importFrom(utils,globalVariables)
importFrom(utils,head)
5 changes: 4 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# crew 0.9.5.9009 (development)
# crew 0.9.5.9010 (development)

* Give full worker name in the worker launch error message (@multimeric).
* Start the controller automatically in more methods.
Expand All @@ -11,6 +11,9 @@
* To passively log memory usage when `log_resources` is given, the controller now calls `log()` as a side effect in most controller methods, with throttling to preserve speed.
* Return a status and status code from `pop()` etc.
* New internal function `as_monad()` makes error reporting more consistent.
* Use `path.expand()` on local log files.
* Switch to `Rscript`.
* Print session info from `crew_worker()` before attempting to dial into `mirai`.

# crew 0.9.5

Expand Down
4 changes: 2 additions & 2 deletions R/crew_launcher_local.R
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ crew_class_launcher_local <- R6::R6Class(
if (!private$.local_log_join) {
name <- paste0(name, "-stdout")
}
file.path(directory, paste0(name, ".log"))
path.expand(file.path(directory, paste0(name, ".log")))
},
.log_stderr = function(name) {
directory <- private$.local_log_directory
Expand All @@ -126,7 +126,7 @@ crew_class_launcher_local <- R6::R6Class(
if_any(
private$.local_log_join,
"2>&1",
file.path(directory, paste0(name, "-stderr.log"))
path.expand(file.path(directory, paste0(name, "-stderr.log")))
)
}
),
Expand Down
2 changes: 1 addition & 1 deletion R/crew_package.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#' @importFrom tidyselect all_of any_of contains ends_with eval_select
#' everything last_col matches num_range one_of starts_with
#' @importFrom tools pskill SIGINT SIGQUIT SIGTERM
#' @importFrom utils compareVersion globalVariables head
#' @importFrom utils capture.output compareVersion globalVariables head
NULL

utils::globalVariables(".")
1 change: 1 addition & 0 deletions R/crew_worker.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ crew_worker <- function(settings, launcher, worker, instance) {
CREW_WORKER = worker,
CREW_INSTANCE = instance
)
crew_message(utils::capture.output(print(sessionInfo())))
do.call(what = mirai::daemon, args = settings)
}

0 comments on commit 61292de

Please sign in to comment.