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
4eb13a8b
Commit
4eb13a8b
authored
Sep 05, 2019
by
trace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix trifles issue
parent
926440ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
play.js
+5
-3
No files found.
play.js
View file @
4eb13a8b
...
...
@@ -211,6 +211,8 @@ async function startMonitor() {
// 将status 写入到文件
fs
.
writeFileSync
(
statusFile
,
JSON
.
stringify
(
status
))
log
(
`文件写入成功`
)
// 恢复默认时间间隔
lastIntervalTime
=
defaultIntervalTime
})
.
then
(()
=>
log
(
'over'
))
.
catch
(
err
=>
{
...
...
@@ -221,7 +223,7 @@ async function startMonitor() {
sendEmail
(
content
,
developer
)
dingDing
(
content
)
if
(
err
.
toString
().
includes
(
'ENOSPC'
))
{
sendEmail
(
`小老弟, 这个爬虫呆着的机器没空间了,
${
err
.
toString
()}
`
,
'
yingchen.nong
@starwin.com'
)
sendEmail
(
`小老弟, 这个爬虫呆着的机器没空间了,
${
err
.
toString
()}
`
,
'
shiyu.tao
@starwin.com'
)
}
// 出错了需要重新抓, 需要清空之前缓存的状态
...
...
@@ -331,7 +333,7 @@ async function getConfig() {
try
{
dataes
=
JSON
.
parse
(
val
.
body
)
}
catch
(
err
)
{
errMsg
=
`哪位老哥, 配置文件写错了啊...>>>>>>>>>\n
${
err
}
\n<<<<<<<<<\n`
errMsg
=
`哪位
安卓
老哥, 配置文件写错了啊...>>>>>>>>>\n
${
err
}
\n<<<<<<<<<\n`
errorLog
.
push
(
errMsg
)
return
}
...
...
@@ -438,7 +440,7 @@ async function getTop100() {
})
.
catch
(
err
=>
{
log
(
`获取排名<
${
monitorRegion
[
region
]}
> 错误:
${
err
.
message
}
`
,
true
)
errorLog
.
push
(
`
${
gplay
.
category
[
type
]}
获取排名<
${
monitorRegion
[
region
]}
> 错误:
${
err
.
message
}
`
)
errorLog
.
push
(
`
(该行仅发送报告, 忽略, 会使用之前获取的列表数据)
${
gplay
.
category
[
type
]}
获取排名<
${
monitorRegion
[
region
]}
> 错误:
${
err
.
message
}
`
)
// 获取排名不到直接不管, 使用上次成功获取的数据
// throw `${gplay.category[type]}获取排名<${monitorRegion[region]}> 错误: ${err.message}`
})
...
...
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