Use synchronous mode since WAL is used

This commit is contained in:
emeric
2020-04-10 16:01:14 +02:00
parent e3ffd2361f
commit e17b2333ac
+1
View File
@@ -34,6 +34,7 @@ Db::Db(const std::filesystem::path& dbPath)
std::unique_ptr<Wt::Dbo::backend::Sqlite3> connection {std::make_unique<Wt::Dbo::backend::Sqlite3>(dbPath.string())}; std::unique_ptr<Wt::Dbo::backend::Sqlite3> connection {std::make_unique<Wt::Dbo::backend::Sqlite3>(dbPath.string())};
connection->executeSql("pragma journal_mode=WAL"); connection->executeSql("pragma journal_mode=WAL");
connection->executeSql("pragma synchronous=normal");
// connection->setProperty("show-queries", "true"); // connection->setProperty("show-queries", "true");
auto connectionPool = std::make_unique<Wt::Dbo::FixedSqlConnectionPool>(std::move(connection), 10); auto connectionPool = std::make_unique<Wt::Dbo::FixedSqlConnectionPool>(std::move(connection), 10);