aboutsummaryrefslogtreecommitdiff
path: root/mod/database-module.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'mod/database-module.cxx')
-rw-r--r--mod/database-module.cxx10
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;
}
}