From 0a518472731f2111a3d0dbf9d649cc18d87516ad Mon Sep 17 00:00:00 2001 From: Jean-Didier Date: Thu, 9 Feb 2023 20:18:31 +0200 Subject: [PATCH] fix bug 291 polymorphic solver --- polymorphic_solver/src/app.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/polymorphic_solver/src/app.py b/polymorphic_solver/src/app.py index 654f6280..77e4a408 100644 --- a/polymorphic_solver/src/app.py +++ b/polymorphic_solver/src/app.py @@ -50,7 +50,7 @@ performance_module_config_topic = os.environ.get("PERFORMANCE_MODULE_CONFIG","pe analysis_frequency = int(os.environ.get("ANALYSIS_FREQUENCY","240")) #Freezing time after a new redeployment logname = "./log/polymorphic_solver.log" logging.basicConfig(filename=logname,filemode='a',format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s',datefmt='%H:%M:%S',level=logging.DEBUG) -config_directory = "./config" +config_directory = "/config" class ApplicationComponent(): def __init__(self, component_name, application_name): @@ -371,12 +371,12 @@ class PolymorphicSolver(): print("Metrics to predict message received ...") if self.metric_to_predict_message == []: self.metric_to_predict_message = data - print('Storing metrics to predict') - _file = open(config_directory+"/metrics_to_predict.json","w") - _file.write(json.dumps(data)) - _file.close() - print('Metrics to predict stored') - return None + print('Storing metrics to predict') + _file = open(config_directory+"/metrics_to_predict.json","w") + _file.write(json.dumps(data)) + _file.close() + print('Metrics to predict stored') + return None if data["request"] == "metrics": if not self.virtual_application.getApplicationName(): -- GitLab