mirror of
https://github.com/Luzifer/mondash.git
synced 2024-11-10 00:20:02 +00:00
Fix: Do not try to continue if error ocurred
This commit is contained in:
parent
d975f946de
commit
b9e5281a87
1 changed files with 2 additions and 2 deletions
|
@ -25,10 +25,8 @@ func runWelcomePage(cfg *config.Config) {
|
|||
switch {
|
||||
case beers < 6:
|
||||
status = "Critical"
|
||||
break
|
||||
case beers < 12:
|
||||
status = "Warning"
|
||||
break
|
||||
}
|
||||
|
||||
beer := dashboardMetric{
|
||||
|
@ -43,6 +41,7 @@ func runWelcomePage(cfg *config.Config) {
|
|||
body, err := json.Marshal(beer)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
continue
|
||||
}
|
||||
url := fmt.Sprintf("%s/welcome/beer_available", baseURL)
|
||||
req, _ := http.NewRequest("PUT", url, bytes.NewBuffer(body))
|
||||
|
@ -50,6 +49,7 @@ func runWelcomePage(cfg *config.Config) {
|
|||
resp, err := http.DefaultClient.Do(req)
|
||||
if err != nil {
|
||||
log.Printf("[WelcomeRunner] %s", err)
|
||||
continue
|
||||
}
|
||||
resp.Body.Close()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue