Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
searchhotcrawler
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhiwei
searchhotcrawler
Commits
136bcddb
Commit
136bcddb
authored
Aug 19, 2019
by
zhiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改线程池大小,并停止手机端知乎热搜采集
parent
0e21bba0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/main/java/com/zhiwei/searchhotcrawler/run/HotSearchRun.java
+1
-1
src/main/java/com/zhiwei/searchhotcrawler/timer/ZhihuHotSearchRun.java
+2
-2
No files found.
src/main/java/com/zhiwei/searchhotcrawler/run/HotSearchRun.java
View file @
136bcddb
...
@@ -24,7 +24,7 @@ public class HotSearchRun {
...
@@ -24,7 +24,7 @@ public class HotSearchRun {
private
ScheduledExecutorService
scheduExec
;
private
ScheduledExecutorService
scheduExec
;
public
HotSearchRun
()
{
public
HotSearchRun
()
{
this
.
scheduExec
=
Executors
.
newScheduledThreadPool
(
5
);
this
.
scheduExec
=
Executors
.
newScheduledThreadPool
(
10
);
}
}
public
void
showTimer
()
{
public
void
showTimer
()
{
...
...
src/main/java/com/zhiwei/searchhotcrawler/timer/ZhihuHotSearchRun.java
View file @
136bcddb
...
@@ -22,8 +22,8 @@ public class ZhihuHotSearchRun extends Thread{
...
@@ -22,8 +22,8 @@ public class ZhihuHotSearchRun extends Thread{
public
void
run
()
{
public
void
run
()
{
logger
.
info
(
"知乎话题采集开始........"
);
logger
.
info
(
"知乎话题采集开始........"
);
List
<
HotSearchList
>
list
=
ZhihuHotSearchCrawler
.
getZhihuHotList
();
List
<
HotSearchList
>
list
=
ZhihuHotSearchCrawler
.
getZhihuHotList
();
List
<
HotSearchList
>
mobilelist
=
ZhihuHotSearchCrawler
.
getMobileZhihuHotList
();
//
List<HotSearchList> mobilelist = ZhihuHotSearchCrawler.getMobileZhihuHotList();
list
.
addAll
(
mobilelist
);
//
list.addAll(mobilelist);
logger
.
info
(
"{}, 知乎此轮采集到的数据量为:{}"
,
new
Date
(),
Integer
.
valueOf
(
list
!=
null
?
list
.
size
()
:
0
));
logger
.
info
(
"{}, 知乎此轮采集到的数据量为:{}"
,
new
Date
(),
Integer
.
valueOf
(
list
!=
null
?
list
.
size
()
:
0
));
for
(
HotSearchList
zhihuHotSearch
:
list
){
for
(
HotSearchList
zhihuHotSearch
:
list
){
DBObject
zhihu
=
new
BasicDBObject
();
DBObject
zhihu
=
new
BasicDBObject
();
...
...
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