Minor updates

This commit is contained in:
TwinProduction
2020-12-29 21:04:07 -05:00
parent bc4380db19
commit d206d63151
2 changed files with 14 additions and 1 deletions

View File

@ -35,7 +35,9 @@ func GetJSONEncodedServiceStatuses() ([]byte, error) {
// GetUptimeByServiceGroupAndName returns the uptime of a service based on its group and name
func GetUptimeByServiceGroupAndName(group, name string) *core.Uptime {
key := fmt.Sprintf("%s_%s", group, name)
serviceStatusesMutex.RLock()
serviceStatus, exists := serviceStatuses[key]
serviceStatusesMutex.RUnlock()
if !exists {
return nil
}