Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GO Email Worker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pasan Mallawaarachchi
GO Email Worker
Commits
f2f1647a
Commit
f2f1647a
authored
May 02, 2019
by
Pasan Mallawaarachchi
💻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mail count
parent
0d0a8da5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
13 deletions
+4
-13
worker.go
worker.go
+4
-13
No files found.
worker.go
View file @
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment