From 17fb477a9091251aa0fd036877e65e815c20e03e Mon Sep 17 00:00:00 2001 From: BjoernAtBosch Date: Thu, 4 Apr 2024 11:36:03 +0200 Subject: [PATCH] Fix high cpu load due to recurring prune job in SDK (#96) --- NOTICE-3RD-PARTY-CONTENT.md | 4 ++-- app/src/Launcher.cpp | 11 +++++++---- conanfile.txt | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/NOTICE-3RD-PARTY-CONTENT.md b/NOTICE-3RD-PARTY-CONTENT.md index 44a6688..1488745 100644 --- a/NOTICE-3RD-PARTY-CONTENT.md +++ b/NOTICE-3RD-PARTY-CONTENT.md @@ -13,12 +13,12 @@ |distlib|0.3.8|Python Software Foundation License| |distro|1.8.0|Apache 2.0| |fasteners|0.19|Apache 2.0| -|filelock|3.13.1|The Unlicense (Unlicense)| +|filelock|3.13.3|The Unlicense (Unlicense)| |gcovr|5.2|BSD| |identify|2.5.35|MIT| |idna|3.6|BSD| |Jinja2|3.1.3|New BSD| -|lxml|5.1.0|New BSD| +|lxml|5.2.1|New BSD| |MarkupSafe|2.1.5|New BSD| |node-semver|0.6.1|MIT| |nodeenv|1.8.0|BSD| diff --git a/app/src/Launcher.cpp b/app/src/Launcher.cpp index 07d546a..16698d3 100644 --- a/app/src/Launcher.cpp +++ b/app/src/Launcher.cpp @@ -18,18 +18,21 @@ #include "sdk/Logger.h" #include +#include + +std::unique_ptr myApp; void signal_handler(int sig) { - velocitas::logger().error("App terminated due to: Signal {}", sig); - exit(-1); + velocitas::logger().info("App terminated due to: Signal {}", sig); + myApp->stop(); } int main(int argc, char** argv) { signal(SIGINT, signal_handler); - example::SampleApp myApp; + myApp = std::make_unique(); try { - myApp.run(); + myApp->run(); } catch (const std::exception& e) { velocitas::logger().error("App terminated due to: {}", e.what()); } catch (...) { diff --git a/conanfile.txt b/conanfile.txt index 20135d1..ef0da93 100644 --- a/conanfile.txt +++ b/conanfile.txt @@ -1,6 +1,6 @@ [requires] vehicle-model/generated -vehicle-app-sdk/0.5.0 +vehicle-app-sdk/0.5.1 [generators] cmake