Commit b5278538 authored by Stephan Handuwala's avatar Stephan Handuwala 🏋🏻

Merge branch 'master' into 'master'

outbox mail count

See merge request !13
parents 9710919c f2f1647a
...@@ -159,17 +159,17 @@ func main() { ...@@ -159,17 +159,17 @@ func main() {
//panic(reqErr) //panic(reqErr)
} }
req.Header.Set(config.Requests.HeaderType, config.Requests.HeaderJson) req.Header.Set(config.Requests.HeaderType, config.Requests.HeaderJson)
resp, respErr := http.DefaultClient.Do(req) resp, respErr := http.DefaultClient.Do(req)
if respErr != nil { if respErr != nil {
alert := " Error in getting email from the OUTBOX DB \n" + respErr.Error() alert := " Error in getting email from the OUTBOX DB \n" + respErr.Error()
alertAdmin(alert) alertAdmin(alert)
//logOutbox(resp.Status, reqErr.Error(), newDoc.Rows[0].ID)
//fmt.Printf("Error : %s", respErr.Error()) //fmt.Printf("Error : %s", respErr.Error())
//panic(respErr) //panic(respErr)
} }
defer resp.Body.Close() //defer resp.Body.Close()
respbody, _ := ioutil.ReadAll(resp.Body) respbody, _ := ioutil.ReadAll(resp.Body)
fmt.Printf(" %s | ", resp.Status) defer resp.Body.Close()
/** /**
* struct the response of the of the cURL request * struct the response of the of the cURL request
...@@ -182,16 +182,7 @@ func main() { ...@@ -182,16 +182,7 @@ func main() {
alertAdmin(alert) alertAdmin(alert)
} }
if respErr != nil { fmt.Printf(" %s, %d | ", resp.Status, newDoc.TotalRows)
alert := " Error in getting email from the OUTBOX DB \n" + respErr.Error()
alertAdmin(alert)
fmt.Printf("Error : %s", reqErr.Error())
logOutbox(resp.Status, reqErr.Error(), newDoc.Rows[0].ID)
//panic(respErr)
}
defer resp.Body.Close()
//fmt.Printf("Status - %d", resp.StatusCode)
// logOutbox()
/** /**
* if: the "OUTBOX" DB has new records, it returns the number of Rows * if: the "OUTBOX" DB has new records, it returns the number of Rows
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment