Skip to content

Commit

Permalink
Fix metric_list message version check (#11)
Browse files Browse the repository at this point in the history
* Miscellaneous improvements

Added required dependencies in the setup script
Improved logging during dataset creation
Added README.md file

Change-Id: I67e98938f3660656d2ced916f258dfe5d475ecd3

* Readme file location correction

Corrected the location of the README.md file

Change-Id: I89b86b7471123d653592cd98f513ff25181d2520

* Environment variable correction

Added default value for an environmental variable

Change-Id: I81ca8f427c78aaec62d3eef9bad47d685e2a84ba

* Small configuration file improvements

* Corrected the publishing of forecasts for a particular application

* Retrieve the appropriate publisher to publish predictions, using the application name

* Fix the check for metric_list message version
  • Loading branch information
atsag authored Sep 19, 2024
1 parent 491d01f commit 928bf73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion exponential-smoothing-predictor/src/runtime/Predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,14 @@ def on_message(self, key, address, body, context, **kwargs):

logging.info("New monitoring data arrived at topic "+address)
if address == 'metric_list':

application_name = body["name"]
message_version = body["version"]
application_state = None
individual_application_state = {}
application_already_defined = application_name in EsPredictorState.individual_application_state
if ( application_already_defined and
( message_version == EsPredictorState.individual_application_state[application_state].message_version )
( message_version == EsPredictorState.individual_application_state[application_name].message_version )
):
individual_application_state = EsPredictorState.individual_application_state
application_state = individual_application_state[application_name]
Expand Down

0 comments on commit 928bf73

Please sign in to comment.