mirror of
https://github.com/201206030/novel.git
synced 2025-04-27 07:30:50 +00:00
更新间隔外部配置
This commit is contained in:
parent
d898e412c7
commit
05dcf7056b
@ -31,6 +31,9 @@ public class StartListener implements ServletContextListener {
|
||||
@Value("${website.domain}")
|
||||
private String webSiteDomain;
|
||||
|
||||
@Value("${books.updatePeriod}")
|
||||
private float bookUpdatePeriod;
|
||||
|
||||
private final SeoConfig seoConfig;
|
||||
|
||||
|
||||
@ -49,8 +52,7 @@ public class StartListener implements ServletContextListener {
|
||||
|
||||
log.info("parseBooks执行中。。。。。。。。。。。。");
|
||||
crawlSource.parse();
|
||||
|
||||
Thread.sleep(1000 * 60 * 5);
|
||||
Thread.sleep(new Float(1000 * 60 * bookUpdatePeriod).longValue());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
@ -65,9 +65,11 @@ index:
|
||||
mysql:
|
||||
charset: utf8mb4
|
||||
|
||||
#爬取小说数据的最低评分
|
||||
books:
|
||||
#爬取小说数据的最低评分
|
||||
lowestScore: 6.0
|
||||
#小说的更新间隔(分)
|
||||
updatePeriod: 5
|
||||
|
||||
#爬取的网站名称类型 1:笔趣岛 ,2:笔趣塔,3:顶点小说 更多网站解析中,敬请期待
|
||||
crawl:
|
||||
|
Loading…
x
Reference in New Issue
Block a user