Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
spider-ufo
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
lzhy
5 years ago
Commit
fd342514c6d2a4608e7c4f38f56633d78cc34af2
1 parent
a73bc4ff
修改
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
tasks/spider-task.js
tasks/spider-task.js
View file @
fd34251
...
...
@@ -25,7 +25,7 @@ const moment = require('moment');
module
.
exports
=
async
(
time
)
=>
{
const
beginTime
=
moment
(
Date
.
now
()).
format
(
'YYYY-MM-DD HH:mm:ss'
);
ddAlert
(
`监控报警
:
开始执行
—
$
{
beginTime
}
`
,
'bjSpider'
);
ddAlert
(
`监控报警
:
比价开始
—
$
{
beginTime
}
`
,
'bjSpider'
);
const
specialSizeProducts
=
await
getSpecialSizeProducts
();
const
sizeData
=
await
mysqlPool
.
query
(
'select `size_name`,min(`id`) as id from `size` where `size_name` <> \'-\' group by `size_name`'
);
const
sizeRelation
=
{};
...
...
@@ -58,7 +58,7 @@ module.exports = async(time) => {
n
++
;
if
(
n
==
sknsData
.
length
)
{
const
endTime
=
moment
(
Date
.
now
()).
format
(
'YYYY-MM-DD HH:mm:ss'
);
ddAlert
(
`监控报警
:
执行
结束
—
$
{
endTime
}
`
,
'bjSpider'
);
ddAlert
(
`监控报警
:
比价
结束
—
$
{
endTime
}
`
,
'bjSpider'
);
}
if
(
result
.
status
!==
200
&&
!
_
.
has
(
result
,
'data.detail'
))
{
...
...
Please
register
or
login
to post a comment