Skip to content

Commit

Permalink
Merge branch 'master' of github.com:PecanProject/pecan
Browse files Browse the repository at this point in the history
  • Loading branch information
robkooper committed Jun 30, 2013
2 parents 41fa405 + bb92de3 commit e7b8096
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions settings/R/read.settings.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,6 @@ check.settings <- function(settings) {
# PostgreSQL specific checks
# TODO IMPLEMENT

# check if we can connect to the database
require(PEcAn.DB)
if (!db.exists(params=settings$database, write=settings$bety$write)) {
logger.warn("Could not connect to the database.")
database <- FALSE
} else {
logger.info("Successfully connected to database")
database <- TRUE
}

# should runs be written to database
if (is.null(settings$bety$write)) {
logger.info("Writing all runs/configurations to database.")
Expand All @@ -91,6 +81,16 @@ check.settings <- function(settings) {
}
}

# check if we can connect to the database
require(PEcAn.DB)
if (!db.exists(params=settings$database, write=settings$bety$write)) {
logger.warn("Could not connect to the database.")
database <- FALSE
} else {
logger.info("Successfully connected to database")
database <- TRUE
}

# TODO check userid and userpassword

# check database version
Expand Down

0 comments on commit e7b8096

Please sign in to comment.