aboutsummaryrefslogtreecommitdiff
path: root/mod/database-module
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-04-04 20:53:00 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-04-19 22:16:46 +0300
commitdbbc19b77dcf6ea828aabd64d7aa8cab9635aaf5 (patch)
treec0b9b449b7064dff3613628022224e6c18148c3e /mod/database-module
parentefb9c3e0e6b612d5bfadc7a2b984c14b5439335c (diff)
Implement build task, result and log requests handling
Diffstat (limited to 'mod/database-module')
-rw-r--r--mod/database-module24
1 files changed, 21 insertions, 3 deletions
diff --git a/mod/database-module b/mod/database-module
index 034324b..3799e7b 100644
--- a/mod/database-module
+++ b/mod/database-module
@@ -10,6 +10,8 @@
#include <brep/types>
#include <brep/utility>
+#include <bbot/build-config>
+
#include <mod/module>
#include <mod/options>
@@ -36,15 +38,31 @@ namespace brep
//
using module::init;
+ // Initialize the package database instance. Throw odb::exception on
+ // failure.
+ //
+ void
+ init (const options::package_db&, size_t retry);
+
+ // Initialize the build database instance and parse build configuration
+ // file. Throw odb::exception on database failure, tab_parsing on parsing
+ // error, system_error on the underlying OS error.
+ //
void
- init (const options::db&);
+ init (const options::build&, const options::build_db&, size_t retry);
virtual bool
handle (request&, response&) = 0;
protected:
- size_t retry_;
- shared_ptr<odb::core::database> db_;
+ size_t retry_ = 0; // Max of all retries.
+
+ shared_ptr<odb::core::database> package_db_;
+
+ // These are NULL if not building.
+ //
+ shared_ptr<odb::core::database> build_db_;
+ shared_ptr<const bbot::build_configs> build_conf_;
private:
virtual bool