Fixed regression on recommendation engine

This commit is contained in:
emeric
2020-08-31 14:15:10 +02:00
parent ea317b62ed
commit 8a84a078be
12 changed files with 74 additions and 24 deletions
+7
View File
@@ -43,6 +43,13 @@ Db::Db(const std::filesystem::path& dbPath)
_connectionPool = std::move(connectionPool);
}
Db::~Db()
{
LMS_LOG(DB, DEBUG) << "Optimizing db...";
executeSql("pragma optimize");
LMS_LOG(DB, DEBUG) << "Optimizing db DONE";
}
void
Db::executeSql(const std::string& sql)
{
@@ -32,6 +32,12 @@ class Db
public:
Db(const std::filesystem::path& dbPath);
~Db();
Db(const Db&) = delete;
Db(Db&&) = delete;
Db& operator=(const Db&) = delete;
Db& operator=(Db&&) = delete;
private:
friend class Session;