diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-04-24 11:39:14 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-04-24 11:39:14 +0300 |
commit | 5f2539b772d068ddc541f3bbcfcb4a3430fa496e (patch) | |
tree | ff2db21780260cde8183b65a5801ce0454966c16 /mod/database-module.cxx | |
parent | 9d539574d55ad5c65d15c040ec40764ffb1f601e (diff) |
Fix tenant service related logic in build task handler
Diffstat (limited to 'mod/database-module.cxx')
-rw-r--r-- | mod/database-module.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mod/database-module.cxx b/mod/database-module.cxx index 07babc6..bbb3e59 100644 --- a/mod/database-module.cxx +++ b/mod/database-module.cxx @@ -76,7 +76,7 @@ namespace brep throw; } - void database_module:: + optional<string> database_module:: update_tenant_service_state ( const connection_ptr& conn, const string& tid, @@ -88,6 +88,8 @@ namespace brep // assert (build_db_ != nullptr); + optional<string> r; + for (size_t retry (retry_);; ) { try @@ -104,6 +106,8 @@ namespace brep { s.data = move (*data); build_db_->update (t); + + r = move (s.data); } } @@ -121,7 +125,11 @@ namespace brep HANDLER_DIAG; l1 ([&]{trace << e << "; " << retry + 1 << " tenant service " << "state update retries left";}); + + r = nullopt; // Prepare for the next iteration. } } + + return r; } } |