diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2025-02-14 16:28:57 +0200 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2025-02-17 21:31:24 +0200 |
commit | 4f9ab8e952cb16a311bd533842296a5bd2e9cc1c (patch) | |
tree | 8a8de9afc5850867d4847f81d7d9233b62452189 /mod/database-module.hxx | |
parent | 62a6bd8d6bb576edf76c42db8ffb73fcb0f87fb7 (diff) |
Sleep for some short period of time before retrying after odb::recoverable exception
Also increase the default maximum number of retries for configuration to 20 from 10.
Diffstat (limited to 'mod/database-module.hxx')
-rw-r--r-- | mod/database-module.hxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mod/database-module.hxx b/mod/database-module.hxx index 29b4cb7..3bcc84e 100644 --- a/mod/database-module.hxx +++ b/mod/database-module.hxx @@ -42,13 +42,13 @@ namespace brep // failure. // void - init (const options::package_db&, size_t retry); + init (const options::package_db&, size_t retry_max); // Initialize the build database instance. Throw odb::exception on // database failure. // void - init (const options::build_db&, size_t retry); + init (const options::build_db&, size_t retry_max); virtual bool handle (request&, response&) = 0; @@ -91,7 +91,8 @@ namespace brep const function<void (const shared_ptr<build_tenant>&)>&); protected: - size_t retry_ = 0; // Max of all retries. + size_t retry_ = 0; // Performed retries. + size_t retry_max_ = 0; // Maximum number of retries to perform. shared_ptr<odb::core::database> package_db_; shared_ptr<odb::core::database> build_db_; // NULL if not building. |