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
ae0a5009
Commit
ae0a5009
authored
Nov 01, 2019
by
zhiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改定时器启动方式
parent
811c679b
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
55 additions
and
55 deletions
+55
-55
src/main/java/com/zhiwei/searchhotcrawler/run/HotSearchRun.java
+19
-19
src/main/java/com/zhiwei/searchhotcrawler/timer/BaiduHotSearchRun.java
+6
-6
src/main/java/com/zhiwei/searchhotcrawler/timer/DouyinHotSearchRun.java
+6
-6
src/main/java/com/zhiwei/searchhotcrawler/timer/SougoHotSearchRun.java
+6
-6
src/main/java/com/zhiwei/searchhotcrawler/timer/WeiboHotSearchRun.java
+6
-6
src/main/java/com/zhiwei/searchhotcrawler/timer/WeiboTopicRun.java
+6
-6
src/main/java/com/zhiwei/searchhotcrawler/timer/ZhihuHotSearchRun.java
+6
-6
No files found.
src/main/java/com/zhiwei/searchhotcrawler/run/HotSearchRun.java
View file @
ae0a5009
...
@@ -30,28 +30,28 @@ public class HotSearchRun {
...
@@ -30,28 +30,28 @@ public class HotSearchRun {
ZhiWeiTools
.
sleep
(
10000
);
ZhiWeiTools
.
sleep
(
10000
);
new
CacheListener
().
startListen
();
new
CacheListener
().
startListen
();
ScheduledExecutorService
scheduledThreadPool
=
Executors
.
newScheduledThreadPool
(
6
);
//
ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(6);
//
scheduledThreadPool
.
scheduleAtFixedRate
(
new
WeiboHotSearchRun
(),
0
,
1
,
TimeUnit
.
MINUTES
);
//
scheduledThreadPool.scheduleAtFixedRate(new WeiboHotSearchRun(), 0, 1, TimeUnit.MINUTES);
//
scheduledThreadPool
.
scheduleAtFixedRate
(
new
BaiduHotSearchRun
(),
0
,
5
,
TimeUnit
.
MINUTES
);
//
scheduledThreadPool.scheduleAtFixedRate(new BaiduHotSearchRun(), 0, 5, TimeUnit.MINUTES);
//
scheduledThreadPool
.
scheduleAtFixedRate
(
new
SougoHotSearchRun
(),
0
,
5
,
TimeUnit
.
MINUTES
);
//
scheduledThreadPool.scheduleAtFixedRate(new SougoHotSearchRun(), 0, 5, TimeUnit.MINUTES);
//
scheduledThreadPool
.
scheduleAtFixedRate
(
new
DouyinHotSearchRun
(),
0
,
10
,
TimeUnit
.
MINUTES
);
//
scheduledThreadPool.scheduleAtFixedRate(new DouyinHotSearchRun(), 0, 10, TimeUnit.MINUTES);
//
scheduledThreadPool
.
scheduleAtFixedRate
(
new
ZhihuHotSearchRun
(),
0
,
10
,
TimeUnit
.
MINUTES
);
//
scheduledThreadPool.scheduleAtFixedRate(new ZhihuHotSearchRun(), 0, 10, TimeUnit.MINUTES);
//
scheduledThreadPool
.
scheduleAtFixedRate
(
new
WeiboTopicRun
(),
0
,
1
,
TimeUnit
.
DAYS
);
//
scheduledThreadPool.scheduleAtFixedRate(new WeiboTopicRun(), 0, 1, TimeUnit.DAYS);
//采集程序启动
//采集程序启动
//
new WeiboHotSearchRun().start();
new
WeiboHotSearchRun
().
start
();
//
new BaiduHotSearchRun().start();
new
BaiduHotSearchRun
().
start
();
//
new SougoHotSearchRun().start();
new
SougoHotSearchRun
().
start
();
//
new DouyinHotSearchRun().start();
new
DouyinHotSearchRun
().
start
();
//
new ZhihuHotSearchRun().start();
new
ZhihuHotSearchRun
().
start
();
//
new WeiboTopicRun().start();
new
WeiboTopicRun
().
start
();
//推送程序启动
//推送程序启动
new
SendWeiboHotSearchRun
().
start
();
new
SendWeiboHotSearchRun
().
start
();
new
SendZhihuHotSearchRun
().
start
();
new
SendZhihuHotSearchRun
().
start
();
...
...
src/main/java/com/zhiwei/searchhotcrawler/timer/BaiduHotSearchRun.java
View file @
ae0a5009
...
@@ -22,17 +22,17 @@ public class BaiduHotSearchRun extends Thread{
...
@@ -22,17 +22,17 @@ public class BaiduHotSearchRun extends Thread{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
//
boolean f = true;
boolean
f
=
true
;
//
while(f) {
while
(
f
)
{
try
{
try
{
getHotList
();
getHotList
();
//
TimeUnit.MINUTES.sleep(5);
TimeUnit
.
MINUTES
.
sleep
(
5
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
fillInStackTrace
();
e
.
fillInStackTrace
();
// ZhiWeiTools.sleep(60*60*1000);
ZhiWeiTools
.
sleep
(
60
*
60
*
1000
);
}
ZhiWeiTools
.
sleep
(
50
);
}
}
// ZhiWeiTools.sleep(50);
// }
}
}
...
...
src/main/java/com/zhiwei/searchhotcrawler/timer/DouyinHotSearchRun.java
View file @
ae0a5009
...
@@ -21,17 +21,17 @@ public class DouyinHotSearchRun extends Thread{
...
@@ -21,17 +21,17 @@ public class DouyinHotSearchRun extends Thread{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
//
boolean f = true;
boolean
f
=
true
;
//
while(f) {
while
(
f
)
{
try
{
try
{
getHotList
();
getHotList
();
//
TimeUnit.MINUTES.sleep(10);
TimeUnit
.
MINUTES
.
sleep
(
10
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
fillInStackTrace
();
e
.
fillInStackTrace
();
// ZhiWeiTools.sleep(60*60*1000);
ZhiWeiTools
.
sleep
(
60
*
60
*
1000
);
}
ZhiWeiTools
.
sleep
(
50
);
}
}
// ZhiWeiTools.sleep(50);
// }
}
}
/**
/**
...
...
src/main/java/com/zhiwei/searchhotcrawler/timer/SougoHotSearchRun.java
View file @
ae0a5009
...
@@ -20,17 +20,17 @@ public class SougoHotSearchRun extends Thread {
...
@@ -20,17 +20,17 @@ public class SougoHotSearchRun extends Thread {
@Override
@Override
public
void
run
()
{
public
void
run
()
{
//
boolean f = true;
boolean
f
=
true
;
//
while(f) {
while
(
f
)
{
try
{
try
{
getHotList
();
getHotList
();
//
TimeUnit.MINUTES.sleep(5);
TimeUnit
.
MINUTES
.
sleep
(
5
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
fillInStackTrace
();
e
.
fillInStackTrace
();
// ZhiWeiTools.sleep(60*60*1000);
ZhiWeiTools
.
sleep
(
60
*
60
*
1000
);
}
ZhiWeiTools
.
sleep
(
50
);
}
}
// ZhiWeiTools.sleep(50);
// }
}
}
...
...
src/main/java/com/zhiwei/searchhotcrawler/timer/WeiboHotSearchRun.java
View file @
ae0a5009
...
@@ -21,17 +21,17 @@ public class WeiboHotSearchRun extends Thread{
...
@@ -21,17 +21,17 @@ public class WeiboHotSearchRun extends Thread{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
//
boolean f = true;
boolean
f
=
true
;
//
while(f) {
while
(
f
)
{
try
{
try
{
getHotList
();
getHotList
();
//
TimeUnit.MINUTES.sleep(1);
TimeUnit
.
MINUTES
.
sleep
(
1
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
fillInStackTrace
();
e
.
fillInStackTrace
();
// ZhiWeiTools.sleep(60*1000);
ZhiWeiTools
.
sleep
(
60
*
1000
);
}
ZhiWeiTools
.
sleep
(
50
);
}
}
// ZhiWeiTools.sleep(50);
// }
}
}
...
...
src/main/java/com/zhiwei/searchhotcrawler/timer/WeiboTopicRun.java
View file @
ae0a5009
...
@@ -21,17 +21,17 @@ public class WeiboTopicRun extends Thread{
...
@@ -21,17 +21,17 @@ public class WeiboTopicRun extends Thread{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
//
boolean f = true;
boolean
f
=
true
;
//
while(f) {
while
(
f
)
{
try
{
try
{
getTopicList
();
getTopicList
();
//
TimeUnit.DAYS.sleep(1);
TimeUnit
.
DAYS
.
sleep
(
1
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
fillInStackTrace
();
e
.
fillInStackTrace
();
// ZhiWeiTools.sleep(60*60*1000);
ZhiWeiTools
.
sleep
(
60
*
60
*
1000
);
}
ZhiWeiTools
.
sleep
(
50
);
}
}
// ZhiWeiTools.sleep(50);
// }
}
}
...
...
src/main/java/com/zhiwei/searchhotcrawler/timer/ZhihuHotSearchRun.java
View file @
ae0a5009
...
@@ -20,17 +20,17 @@ public class ZhihuHotSearchRun extends Thread{
...
@@ -20,17 +20,17 @@ public class ZhihuHotSearchRun extends Thread{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
//
boolean f = true;
boolean
f
=
true
;
//
while(f) {
while
(
f
)
{
try
{
try
{
getHotList
();
getHotList
();
//
TimeUnit.MINUTES.sleep(10);
TimeUnit
.
MINUTES
.
sleep
(
10
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
fillInStackTrace
();
e
.
fillInStackTrace
();
// ZhiWeiTools.sleep(60*60*1000);
ZhiWeiTools
.
sleep
(
60
*
60
*
1000
);
}
ZhiWeiTools
.
sleep
(
50
);
}
}
// ZhiWeiTools.sleep(50);
// }
}
}
...
...
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