diff options
Diffstat (limited to 'mod/ci-common.cxx')
-rw-r--r-- | mod/ci-common.cxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mod/ci-common.cxx b/mod/ci-common.cxx index 5b039ef..164cace 100644 --- a/mod/ci-common.cxx +++ b/mod/ci-common.cxx @@ -819,10 +819,16 @@ namespace brep } optional<build_state> ci_start:: - rebuild (odb::core::database& db, const build_id& id) const + rebuild (odb::core::database& db, + const build_id& id, + function<optional<string> (const tenant_service&, + build_state)> uf) const { using namespace odb::core; + //@@@ Should we not retry transactions (here and in other functions that + // update)? + // NOTE: don't forget to update build_force::handle() if changing anything // here. // @@ -850,6 +856,14 @@ namespace brep b->force = force; db.update (b); } + + if (uf != nullptr) + { + // @@ TODO: + // + // - get tenant from build object? + // - call function and update tenant if necessary. + } } t.commit (); |