summaryrefslogtreecommitdiff
path: root/src/app_console
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-12-09 10:24:35 +1100
committerjacqueline <me@jacqueline.id.au>2023-12-09 10:24:35 +1100
commitbd730c82b0423af65f7148bb4abe01e1c3430691 (patch)
treeee5ea481b6ac9315fa53075c9932f4e5e2876720 /src/app_console
parentca5d7b867c381b7886a660ce744df0b74f38b2e6 (diff)
downloadtangara-fw-bd730c82b0423af65f7148bb4abe01e1c3430691.tar.gz
Do db updates on the bg worker
Diffstat (limited to 'src/app_console')
-rw-r--r--src/app_console/app_console.cpp4
1 files changed, 3 insertions, 1 deletions
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<void>(
+ [=]() { db->updateIndexes(); });
return 0;
}