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() {
//panic(reqErr)
}
req.Header.Set(config.Requests.HeaderType, config.Requests.HeaderJson)
resp, respErr := http.DefaultClient.Do(req)
if respErr != nil {
alert := " Error in getting email from the OUTBOX DB \n" + respErr.Error()
alertAdmin(alert)
//logOutbox(resp.Status, reqErr.Error(), newDoc.Rows[0].ID)
//fmt.Printf("Error : %s", respErr.Error())
//panic(respErr)
}
defer resp.Body.Close()
//defer resp.Body.Close()
respbody, _ := ioutil.ReadAll(resp.Body)
fmt.Printf(" %s | ", resp.Status)
defer resp.Body.Close()
/**
* struct the response of the of the cURL request
......@@ -182,16 +182,7 @@ func main() {
alertAdmin(alert)
}
if respErr != nil {
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()
fmt.Printf(" %s, %d | ", resp.Status, newDoc.TotalRows)
/**
* 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