hydra-queue-runner: Handle $HYDRA_DBI

[?]
Jun 17, 2015, 8:11 PM
CCHPYTCPXUHLSQWDBDVZNFTUSMRLW45DKYTVCU3XKYE3OU5RPUEQC

Dependencies

  • [2] 24BMQDZA Start of single-process hydra-queue-runner
  • [3] UQQ4IL55 Add a error type for "unsupported system type"
  • [4] ENXUSMSV Make concurrency more robust

Change contents

  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 63
    [2.5364][2.5364:5421]()
    Connection() : pqxx::connection("dbname=hydra") { };
    [2.5364]
    [2.5421]
    Connection() : pqxx::connection(getFlags()) { };
    string getFlags()
    {
    string s = getEnv("HYDRA_DBI", "dbi:Pg:dbname=hydra;");
    string prefix = "dbi:Pg:";
    if (string(s, 0, prefix.size()) != prefix)
    throw Error("$HYDRA_DBI does not denote a PostgreSQL database");
    return concatStringsSep(" ", tokenizeString<Strings>(string(s, prefix.size()), ";"));
    }