X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=a1%2Fcontroller.py;h=75d84563202c4252a016da0b8aa31965770d36e7;hb=dd29e4d60ab323fe6bc684951c0a1107d2f0eeb3;hp=b3ce88edb6e19c094b386e49301f5c7678c4f00b;hpb=6b69910923309e05820706dc025e1441463906c9;p=ric-plt%2Fa1.git diff --git a/a1/controller.py b/a1/controller.py index b3ce88e..75d8456 100644 --- a/a1/controller.py +++ b/a1/controller.py @@ -63,9 +63,14 @@ def _gen_body_to_handler(operation, policy_type_id, policy_instance_id, payload= def get_healthcheck(): """ Handles healthcheck GET - Currently, this basically checks the server is alive - """ - return "", 200 + Currently, this checks: + 1. whether the a1 webserver is up (if it isn't, this won't even be called, so even entering this function confirms it is) + 2. checks whether the rmr thread is running and has completed a loop recently + TODO: make "seconds" to pass in a configurable parameter? + """ + if a1rmr.healthcheck_rmr_thread(): + return "", 200 + return "rmr thread is unhealthy", 500 # Policy types