From dbbc19b77dcf6ea828aabd64d7aa8cab9635aaf5 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 4 Apr 2017 20:53:00 +0300 Subject: Implement build task, result and log requests handling --- mod/database-module | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'mod/database-module') 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 #include +#include + #include #include @@ -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 db_; + size_t retry_ = 0; // Max of all retries. + + shared_ptr package_db_; + + // These are NULL if not building. + // + shared_ptr build_db_; + shared_ptr build_conf_; private: virtual bool -- cgit v1.1