Skip to content

Commit

Permalink
repair when your first job fails
Browse files Browse the repository at this point in the history
  • Loading branch information
vortexing committed Dec 6, 2021
1 parent 8043bdb commit b143dbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: fh.wdlR
Title: Convenience Tools for Managing WDL Workflows via Cromwell
Version: 2.0.0
Version: 2.0.1
Authors@R:
person(given = "Amy",
family = "Paguirigan",
Expand Down
7 changes: 4 additions & 3 deletions R/cromwellJobs.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ cromwellJobs <- function(days = 1, workflowName = NULL, workflowStatus = NULL,
)
))$results
cromTable <- purrr::map_dfr(cromDat, dplyr::bind_rows)
if (nrow(cromTable) > 0) {
cromTable <- dplyr::rename(cromTable, "workflow_id" = "id", "workflowName" = "name")
if (nrow(cromTable) > 0 & "id" %in% names(cromTable)) {
cromTable <- dplyr::rename(cromTable, "workflow_id" = "id")
if ("name" %in% colnames(cromTable)) {cromTable <- dplyr::rename(cromTable, "workflowName" = "name")}
cromTable$submission <- lubridate::with_tz(lubridate::ymd_hms(cromTable$submission), tzone = "US/Pacific")
if ("start" %in% colnames(cromTable) == T) {
cromTable$start <- lubridate::with_tz(lubridate::ymd_hms(cromTable$start), tzone = "US/Pacific") }
Expand All @@ -52,7 +53,7 @@ cromwellJobs <- function(days = 1, workflowName = NULL, workflowStatus = NULL,
} else {
cromTable <- data.frame("workflow_id" = NA,
stringsAsFactors = F) }
convertToChar <- c("submission", "start", "end", "workflwoDuration")
convertToChar <- c("submission", "start", "end", "workflowDuration")
theseCols <- colnames(cromTable) %in% convertToChar
cromTable[theseCols] <- lapply(cromTable[theseCols], as.character)
return(cromTable)
Expand Down

0 comments on commit b143dbf

Please sign in to comment.