From bd730c82b0423af65f7148bb4abe01e1c3430691 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Sat, 9 Dec 2023 10:24:35 +1100 Subject: Do db updates on the bg worker --- src/app_console/app_console.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/app_console/app_console.cpp') diff --git a/src/app_console/app_console.cpp b/src/app_console/app_console.cpp index b5698792..63accc21 100644 --- a/src/app_console/app_console.cpp +++ b/src/app_console/app_console.cpp @@ -161,7 +161,9 @@ int CmdDbInit(int argc, char** argv) { std::cout << "no database open" << std::endl; return 1; } - db->updateIndexes(); + + AppConsole::sServices->bg_worker().Dispatch( + [=]() { db->updateIndexes(); }); return 0; } -- cgit v1.2.3