@@ -573,9 +573,8 @@ func GetStatus() (GetStatus200Response, error) {
573
573
postgresStatus .Error = err .Error ()
574
574
}
575
575
576
- hostname := getEnv ("EXPORT_SERVICE_HOST" , "export-service" )
577
- port := getEnv ("EXPORT_SERVICE_PORT" , "8080" )
578
- requestURL := "http://" + hostname + ":" + port + "/version"
576
+ exportServiceUrl := getEnv ("EXPORT_SERVICE_URL" , "http://export-service:8080" )
577
+ requestURL := exportServiceUrl + "/version"
579
578
res , err := http .Get (requestURL )
580
579
if err != nil {
581
580
export_service_status .Status = "ERROR"
@@ -587,9 +586,8 @@ func GetStatus() (GetStatus200Response, error) {
587
586
}
588
587
}
589
588
590
- hostname = getEnv ("SIMILARITY_SERVICE_COSINE_HOST" , "similarity-service-cosine" )
591
- port = getEnv ("SIMILARITY_SERVICE_COSINE_PORT" , "8080" )
592
- requestURL = "http://" + hostname + ":" + port + "/version"
589
+ similarityServiceUrl := getEnv ("SIMILARITY_SERVICE_COSINE_URL" , "http://similarity-service:8080" )
590
+ requestURL = similarityServiceUrl + "/version"
593
591
res , err = http .Get (requestURL )
594
592
if err != nil {
595
593
similarity_service_status .Status = "ERROR"
@@ -1044,9 +1042,8 @@ func GetSimilarity(peakList []string, threshold float64, referenceSpectraList []
1044
1042
peakListParam = append (peakListParam , datatype1 {Mz : mz , Intensity : rel })
1045
1043
}
1046
1044
1047
- hostname := getEnv ("SIMILARITY_SERVICE_COSINE_HOST" , "similarity-service-cosine" )
1048
- port := getEnv ("SIMILARITY_SERVICE_COSINE_PORT" , "8080" )
1049
- requestURL := "http://" + hostname + ":" + port + "/similarity"
1045
+ similarityServiceUrl := getEnv ("SIMILARITY_SERVICE_COSINE_URL" , "http://similarity-service:8080" )
1046
+ requestURL := similarityServiceUrl + "/similarity"
1050
1047
1051
1048
type datatype2 struct {
1052
1049
PeakList []datatype1 `json:"peak_list"`
0 commit comments