From d4a089082a3cc689854618b7d38501949a1f80a7 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Tue, 19 Dec 2023 15:31:43 +0900 Subject: [PATCH] Change the regeration timing after all cache remove Since the operation of removing all caches is when the language is changed or db is changed during cache creation, remove the operation of attempting to create cache for each request and try to create cache again after a certain period of time after removing all caches Change-Id: I4b70af215bd68ad5ac97f0ae733bf7063fe3421f Signed-off-by: Ilho Kim --- src/server/runner.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/server/runner.cc b/src/server/runner.cc index 2d29a93..7c18adb 100644 --- a/src/server/runner.cc +++ b/src/server/runner.cc @@ -89,10 +89,6 @@ int Runner::OnReceiveRequest(int fd, GIOCondition cond, void* user_data) { auto req = std::make_shared(client_fd); - if (CacheFlag::SetPreparing()) { - runner->QueueRequest( - std::make_shared(runner->default_uid_, runner)); - } runner->QueueRequest(std::move(req)); return G_SOURCE_CONTINUE; @@ -101,6 +97,7 @@ int Runner::OnReceiveRequest(int fd, GIOCondition cond, void* user_data) { void Runner::OnChanged(const std::string& locale) { thread_pool_->SetLocale(locale); QueueRequest(std::make_shared(default_uid_)); + SetCreateCacheTimer(); } void Runner::OnDbChanged() { -- 2.7.4