From 49fe304069737c361de49a4050c6f07226f364af Mon Sep 17 00:00:00 2001 From: Henry Winkel Date: Thu, 21 Dec 2023 17:19:26 +0100 Subject: [PATCH] ADD: ubdated stopping of the app --- libs/KubeControl | 2 +- src/Entities/Entity.cpp | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libs/KubeControl b/libs/KubeControl index 894b2a0..d1024de 160000 --- a/libs/KubeControl +++ b/libs/KubeControl @@ -1 +1 @@ -Subproject commit 894b2a08d671fc5d4144779af8f78d9fbb502a32 +Subproject commit d1024de907ee38e75a7b13375da9f9fe3aaa7a71 diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index a246c5f..6ed4acc 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -77,7 +77,6 @@ namespace Entities Entity::~Entity() { stop(); - } @@ -137,9 +136,13 @@ namespace Entities } void Entity::stop() - { - + { + LOG_S(INFO)<<"Child pods:" << PodController_->getListOfChildPods(); PodController_->stopAllPods(); + LOG_S(INFO)<<"Child pods after stopping:" << PodController_->getListOfChildPods(); + std::this_thread::sleep_for(std::chrono::milliseconds(5000)); + + LOG_S(INFO)<<"Pods stoppt"; stopChild(); LOG_S(INFO)<<"childs stoppt"; @@ -304,6 +307,7 @@ namespace Entities case SimCore::SHUT_DOWN : { LOG_S(INFO)<<"shutdown received"; + this->stop(); } case SimCore::CREATE_ENTITY: