diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-01-17 12:09:14 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-01-17 12:09:14 +1100 |
| commit | a4d03fc704f2f1e769421c8f2269c670af71fac8 (patch) | |
| tree | 58803bb654fd522e846753558e06b1e34352ff29 /src/lua | |
| parent | 71b46730394979ea528d152dbe884cc35c368759 (diff) | |
| download | tangara-fw-a4d03fc704f2f1e769421c8f2269c670af71fac8.tar.gz | |
Make reindex button work; no feedback yet
Diffstat (limited to 'src/lua')
| -rw-r--r-- | src/lua/lua_database.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lua/lua_database.cpp b/src/lua/lua_database.cpp index ac7d711b..57cefbbc 100644 --- a/src/lua/lua_database.cpp +++ b/src/lua/lua_database.cpp @@ -95,10 +95,19 @@ static auto size(lua_State* L) -> int { } static auto recreate(lua_State* L) -> int { + ESP_LOGI(kTag, "recreate"); return 0; } static auto update(lua_State* L) -> int { + Bridge* instance = Bridge::Get(L); + auto db = instance->services().database().lock(); + if (!db) { + return 0; + } + + instance->services().bg_worker().Dispatch<void>( + [=]() { db->updateIndexes(); }); return 0; } |
