Skip to content

Commit

Permalink
close logger properly and go to next iteration if no outcomes
Browse files Browse the repository at this point in the history
  • Loading branch information
egillax committed May 6, 2024
1 parent 1e315e4 commit 241eb37
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions R/ExternalValidatePlp.R
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ validateExternal <- function(validationDesignList,
logSettings$logFileName <- 'validationLog'
logger <- do.call(createLog, logSettings)
ParallelLogger::registerLogger(logger)
on.exit(logger$close())
on.exit(closeLog(logger))

ParallelLogger::logInfo(paste('Validating model on', database$cdmDatabaseName))

Expand Down Expand Up @@ -476,7 +476,11 @@ validateExternal <- function(validationDesignList,
error = function(e) {
ParallelLogger::logError(e)
return(NULL)
})
})
if (is.null(plpData)) {
ParallelLogger::logInfo("Couldn't extract plpData for the given design and database, proceding to the next one.")
next
}
plpDataName <-
paste0("targetId_", design$targetId, "_L", "1") # Is the 1 for how many targetIds in file ?
plpDataLocation <-
Expand Down

0 comments on commit 241eb37

Please sign in to comment.