diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-05-26 13:46:55 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-05-28 13:58:46 +0300 |
commit | a7ae434c48c14bfde46a871455a3aa2ac0b81376 (patch) | |
tree | 2d4f66a2e153842e166becfcbb2a820036faffcb /mod/ci-common.hxx | |
parent | 5e631e5f63fdc8528d5d178d6a66dfb32a2c0f8b (diff) |
Add CI cancel handler
Diffstat (limited to 'mod/ci-common.hxx')
-rw-r--r-- | mod/ci-common.hxx | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/mod/ci-common.hxx b/mod/ci-common.hxx index 8efeb26..848bca1 100644 --- a/mod/ci-common.hxx +++ b/mod/ci-common.hxx @@ -111,6 +111,20 @@ namespace brep const string& type, const string& id) const; + // Cancel previously created or started CI request. Return false if there + // is no tenant for the specified tenant id. Note that the reason argument + // is only used for tracing. + // + // Note: should be called out of the database transaction. + // + bool + cancel (const basic_mark& error, + const basic_mark& warn, + const basic_mark* trace, + const string& reason, + odb::core::database&, + const string& tenant_id) const; + // Helpers. // @@ -122,22 +136,6 @@ namespace brep private: shared_ptr<options::ci_start> options_; }; - - class ci_cancel - { - public: - void - init (shared_ptr<options::ci_cancel>, shared_ptr<odb::core::database>); - - // @@ TODO Archive the tenant. - // - void - cancel (/*...*/); - - private: - shared_ptr<options::ci_cancel> options_; - shared_ptr<odb::core::database> build_db_; - }; } #endif // MOD_CI_COMMON_HXX |