aboutsummaryrefslogtreecommitdiff
path: root/mod/ci-common.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-12-02 14:01:53 +0200
committerKaren Arutyunov <karen@codesynthesis.com>2024-12-02 14:01:53 +0200
commit56e8ebbb2f9ce02149f248aecebe20fcfd1d8e07 (patch)
tree836b4728d3645971722aaa4b30ee1d6b84f47013 /mod/ci-common.cxx
parent0ae394e9bb425dc8a3b06e7ba722df4f39bcf61d (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};
}
}