Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AppMonitorSubscriber
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nongyingchen
AppMonitorSubscriber
Commits
80106e85
Commit
80106e85
authored
May 06, 2019
by
trace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
josn 解析错误拦截
parent
183cc78d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
play.js
+11
-6
No files found.
play.js
View file @
80106e85
...
@@ -253,7 +253,12 @@ async function getConfig() {
...
@@ -253,7 +253,12 @@ async function getConfig() {
}
}
})
})
}
else
{
}
else
{
dataes
=
JSON
.
parse
(
val
.
body
)
try
{
dataes
=
JSON
.
parse
(
val
.
body
)
}
catch
(
err
)
{
errorLog
.
push
(
`哪位老哥, 配置文件写错了啊...>>>>>>>>>\n
${
err
}
\n<<<<<<<<<\n`
)
return
}
let
config
=
dataes
.
config
let
config
=
dataes
.
config
let
subscriber
=
dataes
.
subscriber
let
subscriber
=
dataes
.
subscriber
ourApps
=
dataes
.
ourApps
||
{}
ourApps
=
dataes
.
ourApps
||
{}
...
@@ -649,11 +654,11 @@ function sendEmail(content, to = notifyEmail) {
...
@@ -649,11 +654,11 @@ function sendEmail(content, to = notifyEmail) {
return
return
}
}
console
.
log
(
`发送email:
${
content
.
length
}
`
)
console
.
log
(
`发送email:
${
content
.
length
}
`
)
if
(
content
.
indexOf
(
'Error'
)
!=
-
1
)
{
//
if (content.indexOf('Error') != -1) {
to
=
developer
//
to = developer
}
else
{
//
} else {
// to = [...to, 添加只对自己app监控的人]
//
// to = [...to, 添加只对自己app监控的人]
}
//
}
let
myEmail
=
'chaolun.ni@starwin.com'
let
myEmail
=
'chaolun.ni@starwin.com'
let
emailTo
=
to
.
join
(
', '
)
let
emailTo
=
to
.
join
(
', '
)
...
...
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