aboutsummaryrefslogtreecommitdiff
path: root/mod/ci-common.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-12-02 11:45:35 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-12-10 16:44:55 +0200
commit3871a466fa21ed7ecb6a7b1d1d5ef4d14b736a48 (patch)
treeca7ef104f5c47c86127afd8f592a512385b8601c /mod/ci-common.cxx
parent1d0a198748c0e4aa1ce22ab2989a2b734f7d8948 (diff)
Add tenant id to tenant service notifications and callbacks
Diffstat (limited to 'mod/ci-common.cxx')
-rw-r--r--mod/ci-common.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/mod/ci-common.cxx b/mod/ci-common.cxx
index cba421b..e720914 100644
--- a/mod/ci-common.cxx
+++ b/mod/ci-common.cxx
@@ -955,7 +955,8 @@ namespace brep
rebuild (odb::core::database& db,
size_t retry,
const build_id& id,
- function<optional<string> (const tenant_service&,
+ function<optional<string> (const string& tenant_id,
+ const tenant_service&,
build_state)> uf) const
{
using namespace odb::core;
@@ -1002,7 +1003,7 @@ namespace brep
tenant_service& ts (*t->service);
- if (optional<string> data = uf (ts, s))
+ if (optional<string> data = uf (t->id, ts, s))
{
ts.data = move (*data);
db.update (t);
@@ -1030,7 +1031,7 @@ namespace brep
return s;
}
- optional<pair<tenant_service, bool>> ci_start::
+ optional<ci_start::tenant_data> ci_start::
find (odb::core::database& db,
const string& type,
const string& id) const
@@ -1052,6 +1053,6 @@ namespace brep
if (t == nullptr || !t->service)
return nullopt;
- return pair<tenant_service, bool> (move (*t->service), t->archived);
+ return tenant_data {move (t->id), move (*t->service), t->archived};
}
}