Commit 5b1b6c78 authored by Pasan Mallawaarachchi's avatar Pasan Mallawaarachchi 💻

dev

parent 0d911a0c
File added
...@@ -120,6 +120,12 @@ func main() { ...@@ -120,6 +120,12 @@ func main() {
panic(configErr) panic(configErr)
} }
_, reqErrOutbox := http.NewRequest(config.Requests.Get, config.Curl.CheckMail, nil)
if reqErrOutbox != nil {
fmt.Println("Error Connectiong to CouchDB")
os.Exit(1)
} else {
if config.AppMod.Production == "0" { if config.AppMod.Production == "0" {
fmt.Println("Starting the Email Manager...") fmt.Println("Starting the Email Manager...")
} }
...@@ -262,6 +268,7 @@ func main() { ...@@ -262,6 +268,7 @@ func main() {
close(outboxReadTime) close(outboxReadTime)
close(outboxDeleteTime) close(outboxDeleteTime)
waitGroup.Wait() waitGroup.Wait()
}
} }
func worker(i int) { func worker(i int) {
...@@ -465,6 +472,9 @@ func getFile(fileName, url string) { ...@@ -465,6 +472,9 @@ func getFile(fileName, url string) {
// Write the body to file // Write the body to file
_, err = io.Copy(out, resp.Body) _, err = io.Copy(out, resp.Body)
if err != nil {
panic(err)
}
} }
......
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