diff --git a/gateway/dataManager/alerter.go b/gateway/dataManager/alerter.go index 3ba8180..e56ed04 100644 --- a/gateway/dataManager/alerter.go +++ b/gateway/dataManager/alerter.go @@ -71,16 +71,16 @@ func (alerter *Alerter) CheckHealthParameter(param string, sample Sample) bool { switch param { case "temperature": - isAbnormal = sample.Value < 36.0 || sample.Value > 38 + isAbnormal = sample.Value < 36.1 || sample.Value > 42 message = fmt.Sprintf("Alert! Abnormal %s: %.2f°C", param, sample.Value) case "acceleration": isAbnormal = sample.Value > 500 message = fmt.Sprintf("Alert! Abnormal %s: %.2f m/s²", param, sample.Value) case "glucose": - isAbnormal = sample.Value < 50 || sample.Value > 140 + isAbnormal = sample.Value < 20 || sample.Value > 90 message = fmt.Sprintf("Alert! Abnormal %s: %.2f mg/dL", param, sample.Value) case "heartrate": - isAbnormal = sample.Value < 50 || sample.Value > 120 + isAbnormal = sample.Value < 50 || sample.Value > 150 message = fmt.Sprintf("Alert! Abnormal %s: %.2f BPM", param, sample.Value) default: fmt.Println("Unknown parameter:", param) diff --git a/gateway/docker-compose.yml b/gateway/docker-compose.yml index 226f6e0..d997f7e 100644 --- a/gateway/docker-compose.yml +++ b/gateway/docker-compose.yml @@ -16,7 +16,7 @@ services: - rabbitmq networks: - internal - - poulet_internal + #- poulet_internal data-manager: build: @@ -30,14 +30,14 @@ services: - RABBITMQ_PASSWORD=guest - NOTIFICATION_SERVER=http://doctor.al.apoorva64.com - CLIENT_INFO_SERVER=http://doctor.al.apoorva64.com - - GATEWAY_ID=671ec1f0c368aa3dd8f66649 + - GATEWAY_ID=6733c47743bcd67dd1c3bb85 volumes: - /etc/localtime:/etc/localtime:ro depends_on: - rabbitmq networks: - internal - - poulet_internal + #- poulet_internal rabbitmq: image: rabbitmq:management @@ -48,7 +48,7 @@ services: - 127.0.0.1:8080:15672 networks: - internal - - poulet_internal + #- poulet_internal agent: @@ -67,5 +67,5 @@ services: networks: internal: - poulet_internal: - external: true +# poulet_internal: +# external: true