Skip to content

Commit

Permalink
feat: log segfault error
Browse files Browse the repository at this point in the history
  • Loading branch information
be-marc committed Feb 9, 2024
1 parent 836a89c commit fa7d2df
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/Rush.R
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ Rush = R6::R6Class("Rush",
processx::process$new("Rscript",
args = c("-e", sprintf("rush::start_worker(network_id = '%s', worker_id = '%s', hostname = '%s', url = '%s')",
self$network_id, worker_id, private$.hostname, self$config$url)),
supervise = supervise, stdout = "|", stderr = "|") # , stdout = "|", stderr = "|"
supervise = supervise, stderr = "|") # , stdout = "|", stderr = "|"
}), worker_ids))

if (wait_for_workers) self$wait_for_workers(n_workers)
Expand Down Expand Up @@ -424,6 +424,10 @@ Rush = R6::R6Class("Rush",
# search for associated worker ids
lost_workers = local_workers[!running]
lg$error("Lost %i worker(s): %s", length(lost_workers), str_collapse(lost_workers))
walk(lost_workers, function(worker_id) {
x = self$processes[[worker_id]]$read_all_error_lines()
walk(x, lg$error)
})

if (restart_workers) {
self$restart_workers(unlist(lost_workers))
Expand Down

0 comments on commit fa7d2df

Please sign in to comment.