summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gentoobrowse-api/service/maintenanceCommon.cpp10
-rw-r--r--gentoobrowse-api/service/maintenancePackageTree.cpp8
-rw-r--r--gentoobrowse-api/service/maintenanceimpl.h1
3 files changed, 13 insertions, 6 deletions
diff --git a/gentoobrowse-api/service/maintenanceCommon.cpp b/gentoobrowse-api/service/maintenanceCommon.cpp
index d7fdc1b..77a9dea 100644
--- a/gentoobrowse-api/service/maintenanceCommon.cpp
+++ b/gentoobrowse-api/service/maintenanceCommon.cpp
@@ -9,6 +9,16 @@
namespace Gentoo {
namespace Service {
+ Maintenance::Maintenance(IceTray::DatabasePoolPtr d) :
+ IceTray::AbstractDatabaseClient(d)
+ {
+ setupFileProcessors();
+ }
+
+ Maintenance::~Maintenance()
+ {
+ }
+
Maintenance::FileProcessor::FileProcessor(bool v) :
vcsMode(v)
{
diff --git a/gentoobrowse-api/service/maintenancePackageTree.cpp b/gentoobrowse-api/service/maintenancePackageTree.cpp
index 531dc47..50580d5 100644
--- a/gentoobrowse-api/service/maintenancePackageTree.cpp
+++ b/gentoobrowse-api/service/maintenancePackageTree.cpp
@@ -66,8 +66,8 @@ R"DATA( 10 category metadata 2 2 {"(2,metadata.xml)"}
return FileProcessorPtr(new T(vcsMode));
}
- Maintenance::Maintenance(IceTray::DatabasePoolPtr d) :
- IceTray::AbstractDatabaseClient(d)
+ void
+ Maintenance::setupFileProcessors()
{
fpfs[CategoryMetaProcessor::FILETYPEID] = &createFileProessor<CategoryMetaProcessor>;
fpfs[PackageMetaProcessor::FILETYPEID] = &createFileProessor<PackageMetaProcessor>;
@@ -80,10 +80,6 @@ R"DATA( 10 category metadata 2 2 {"(2,metadata.xml)"}
fpfs[UpdatesProcessor::FILETYPEID] = &createFileProessor<UpdatesProcessor>;
}
- Maintenance::~Maintenance()
- {
- }
-
void
Maintenance::fileDeleted(DB::Connection * dbc, const FileProcessors * fps, const boost::filesystem::path & tmp, const RepoMap * repos, DB::SelectCommandPtr s)
{
diff --git a/gentoobrowse-api/service/maintenanceimpl.h b/gentoobrowse-api/service/maintenanceimpl.h
index 33cccd3..b9974f1 100644
--- a/gentoobrowse-api/service/maintenanceimpl.h
+++ b/gentoobrowse-api/service/maintenanceimpl.h
@@ -48,6 +48,7 @@ namespace Gentoo {
void sendNotifications(const Ice::Current &) override;
private:
+ void setupFileProcessors();
void updateFileTypes(DB::Connection *) const;
static RepoMap createTempFileList(DB::Connection *, const boost::filesystem::path &);
void processChanges(DB::Connection *, const boost::filesystem::path &, const RepoMap & repos);