Merge pull request #983 from Taneb/libpqxx-deprecations

Fix build with libpqxx 7
This commit is contained in:
Graham Christensen 2021-07-05 20:15:27 -04:00 committed by GitHub
commit 2bb1ba22d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
AC_INIT([Hydra], [m4_esyscmd([echo -n $(cat ./version)$VERSION_SUFFIX])]) AC_INIT([Hydra], [m4_esyscmd([echo -n $(cat ./version.txt)$VERSION_SUFFIX])])
AC_CONFIG_AUX_DIR(config) AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE([foreign serial-tests]) AM_INIT_AUTOMAKE([foreign serial-tests])

View File

@ -6,7 +6,7 @@
outputs = { self, nixpkgs, nix }: outputs = { self, nixpkgs, nix }:
let let
version = "${builtins.readFile ./version}.${builtins.substring 0 8 self.lastModifiedDate}.${self.shortRev or "DIRTY"}"; version = "${builtins.readFile ./version.txt}.${builtins.substring 0 8 self.lastModifiedDate}.${self.shortRev or "DIRTY"}";
pkgs = import nixpkgs { pkgs = import nixpkgs {
system = "x86_64-linux"; system = "x86_64-linux";

View File

@ -233,12 +233,12 @@ struct Evaluator
pqxx::work txn(*conn); pqxx::work txn(*conn);
if (jobset.evaluation_style == EvaluationStyle::ONE_AT_A_TIME) { if (jobset.evaluation_style == EvaluationStyle::ONE_AT_A_TIME) {
auto evaluation_res = txn.parameterized auto evaluation_res = txn.exec_params
("select id from JobsetEvals " ("select id from JobsetEvals "
"where jobset_id = $1 " "where jobset_id = $1 "
"order by id desc limit 1") "order by id desc limit 1"
(jobset.name.id) ,jobset.name.id
.exec(); );
if (evaluation_res.empty()) { if (evaluation_res.empty()) {
// First evaluation, so allow scheduling. // First evaluation, so allow scheduling.
@ -249,15 +249,15 @@ struct Evaluator
auto evaluation_id = evaluation_res[0][0].as<int>(); auto evaluation_id = evaluation_res[0][0].as<int>();
auto unfinished_build_res = txn.parameterized auto unfinished_build_res = txn.exec_params
("select id from Builds " ("select id from Builds "
"join JobsetEvalMembers " "join JobsetEvalMembers "
" on (JobsetEvalMembers.build = Builds.id) " " on (JobsetEvalMembers.build = Builds.id) "
"where JobsetEvalMembers.eval = $1 " "where JobsetEvalMembers.eval = $1 "
" and builds.finished = 0 " " and builds.finished = 0 "
" limit 1") " limit 1"
(evaluation_id) ,evaluation_id
.exec(); );
// If the previous evaluation has no unfinished builds // If the previous evaluation has no unfinished builds
// schedule! // schedule!