aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-10-22 15:54:15 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-10-23 09:09:37 +0200
commitd6e2e4c795cf719af4057cca24b8e8ddf7e1af62 (patch)
tree9129befb005deac5f2b12f351e726559971ef653
parent15159b41c82233b709513f689b7797ff50809562 (diff)
Partially revert previous commit
-rw-r--r--mod/ci-common.hxx25
1 files changed, 17 insertions, 8 deletions
diff --git a/mod/ci-common.hxx b/mod/ci-common.hxx
index cc432c4..23e6360 100644
--- a/mod/ci-common.hxx
+++ b/mod/ci-common.hxx
@@ -37,20 +37,29 @@ namespace brep
optional<brep::version> version;
};
- // Note that the inability to generate the tenant id is an internal
+ // Note that the inability to generate the reference is an internal
// error. Thus, it is not optional.
//
+ // Note that if the CI request information is persisted to the database
+ // (which, depending on the CI request handler, may not be the case), then
+ // the reference is assumed to be the respective tenant id.
+ //
struct start_result
{
uint16_t status;
string message;
- string tenant_id;
+ string reference;
vector<pair<string, string>> custom_result;
};
// In the optional tenant service information, if service id is empty,
// then the generated tenant id is used instead.
//
+ // Note that if the tenant service is specified, then the CI request
+ // information is expected to be persisted to the database and thus
+ // start_result::reference denotes the tenant id in this case (see above
+ // for details).
+ //
optional<start_result>
start (const basic_mark& error,
const basic_mark& warn,
@@ -65,12 +74,12 @@ namespace brep
const vector<pair<string, string>>& custom_request = {},
const vector<pair<string, string>>& overrides = {}) const;
- // Create an unloaded CI request returning start_result::tenant_id on
- // success and nullopt on an internal error. Such a request is not started
- // until loaded with the load() function below. Configure the time
- // interval between the build_unloaded() notifications for the being
- // created tenant and set the initial delay for the first notification.
- // See also the build_unloaded() tenant services notification.
+ // Create an unloaded CI request returning tenant id on success and
+ // nullopt on an internal error. Such a request is not started until
+ // loaded with the load() function below. Configure the time interval
+ // between the build_unloaded() notifications for the being created tenant
+ // and set the initial delay for the first notification. See also the
+ // build_unloaded() tenant services notification.
//
// The duplicate_tenant_mode argument specifies the behavior in case of
// the duplicate tenant_service type/id pair. The default is to fail by