aboutsummaryrefslogtreecommitdiff
path: root/mod/ci-common.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'mod/ci-common.cxx')
-rw-r--r--mod/ci-common.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/mod/ci-common.cxx b/mod/ci-common.cxx
index c0ef89f..b3fc432 100644
--- a/mod/ci-common.cxx
+++ b/mod/ci-common.cxx
@@ -534,14 +534,15 @@ namespace brep
s.next ("", ""); // End of manifest.
}
- optional<string> ci_start::
+ pair<optional<string>, ci_start::duplicate_tenant_result> ci_start::
create (const basic_mark& error,
const basic_mark&,
const basic_mark* trace,
odb::core::database& db,
tenant_service&& service,
duration notify_interval,
- duration notify_delay) const
+ duration notify_delay,
+ duplicate_tenant_mode) const
{
using namespace odb::core;
@@ -556,7 +557,7 @@ namespace brep
catch (const system_error& e)
{
error << "unable to generate request id: " << e;
- return nullopt;
+ return {nullopt, duplicate_tenant_result::ignored}; // @@ TODO HACKED AROUND
}
// Use the generated request id if the tenant service id is not specified.
@@ -604,7 +605,7 @@ namespace brep
*trace << "unloaded CI request " << t.id << " for service "
<< t.service->id << ' ' << t.service->type << " is created";
- return move (t.id);
+ return {move (t.id), duplicate_tenant_result::created}; // @@ TODO HACKED AROUND
}
optional<ci_start::start_result> ci_start::
@@ -707,6 +708,8 @@ namespace brep
if (t == nullptr)
return nullopt;
+ // @@ Why not remove it if unloaded (and below)?
+
optional<tenant_service> r (move (t->service));
t->service = nullopt;
t->archived = true;