Commit 865ec9ef authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Delete publish send only SERVICE_API_UNAVAILABLE

parent a84cb754
Loading
Loading
Loading
Loading
Loading
+6 −19
Original line number Diff line number Diff line
@@ -228,11 +228,6 @@ class PublishServiceOperations(Resource):
            serviceapidescription = clean_empty(
                dict_to_camel_case(serviceapidescription_dict))
            if res.status_code == 204:
                is_supported = serviceapidescription.get("supportedFeatures") and \
                    ServiceAPIDescription.return_supp_feat_dict(
                        serviceapidescription["supportedFeatures"]).get("ApiStatusMonitoring")

                if is_supported:
                current_app.logger.info("Service unavailable")
                RedisEvent(
                    "SERVICE_API_UNAVAILABLE",
@@ -240,14 +235,6 @@ class PublishServiceOperations(Resource):
                    api_ids=[str(service_api_id)]
                ).send_event()

                else:
                    status_message = "Service available" if serviceapidescription.get(
                        "supportedFeatures") is None else "Service unavailable"
                    current_app.logger.info(status_message)
                    RedisEvent(
                        "SERVICE_API_UNAVAILABLE", api_ids=[str(service_api_id)]
                    ).send_event()

            return res

        except Exception as e: