aboutsummaryrefslogtreecommitdiffstats
path: root/src/module/GpgFrontendModuleInit.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2023-12-04 11:20:42 +0000
committersaturneric <[email protected]>2023-12-04 11:20:42 +0000
commit9f19fe9bffe812ca6ad34e47f0d3fbb39c2a15b5 (patch)
treebedd57a31f8d8272f293bb3a16cd77b5564f0e58 /src/module/GpgFrontendModuleInit.cpp
parentfeat: standarized and speed up app env loading process (diff)
downloadGpgFrontend-9f19fe9bffe812ca6ad34e47f0d3fbb39c2a15b5.tar.gz
GpgFrontend-9f19fe9bffe812ca6ad34e47f0d3fbb39c2a15b5.zip
fix: slove logger system isolation issues
Diffstat (limited to '')
-rw-r--r--src/module/GpgFrontendModuleInit.cpp32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/module/GpgFrontendModuleInit.cpp b/src/module/GpgFrontendModuleInit.cpp
index 1e83af0e..d322a528 100644
--- a/src/module/GpgFrontendModuleInit.cpp
+++ b/src/module/GpgFrontendModuleInit.cpp
@@ -48,25 +48,27 @@ void ShutdownGpgFrontendModulesLoggingSystem() {
}
void LoadGpgFrontendModules(ModuleInitArgs args) {
- // init the logging system for module system
- LoadGpgFrontendModulesLoggingSystem(args);
-
- MODULE_LOG_INFO("loading integrated module...");
+ // must init at default thread before core
+ Thread::TaskRunnerGetter::GetInstance().GetTaskRunner()->PostTask(
+ new Thread::Task(
+ [args](const DataObjectPtr&) -> int {
+ // init the logging system for module system
+ LoadGpgFrontendModulesLoggingSystem(args);
- // VersionCheckingModule
- RegisterAndActivateModule<
- Integrated::VersionCheckingModule::VersionCheckingModule>();
+ MODULE_LOG_INFO("loading integrated module...");
- // VersionCheckingModule
- RegisterAndActivateModule<
- Integrated::GnuPGInfoGatheringModule::GnuPGInfoGatheringModule>();
+ // VersionCheckingModule
+ RegisterAndActivateModule<
+ Integrated::VersionCheckingModule::VersionCheckingModule>();
- MODULE_LOG_INFO("load integrated module done.");
+ // VersionCheckingModule
+ RegisterAndActivateModule<Integrated::GnuPGInfoGatheringModule::
+ GnuPGInfoGatheringModule>();
- // must init at default thread before core
- Thread::TaskRunnerGetter::GetInstance().GetTaskRunner()->PostTask(
- new Thread::Task([](const DataObjectPtr&) -> int { return 0; },
- "modules_system_init_task"));
+ MODULE_LOG_INFO("load integrated module done.");
+ return 0;
+ },
+ "modules_system_init_task"));
}
void ShutdownGpgFrontendModules() {}