mirror of
https://gitee.com/novel_dev_team/novel-plus
synced 2026-07-20 17:54:59 +08:00
es优化
This commit is contained in:
@@ -44,9 +44,9 @@ public class BookToEsSchedule {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 10秒钟导入一次
|
* 1分钟导入一次
|
||||||
*/
|
*/
|
||||||
@Scheduled(fixedRate = 1000 * 10)
|
@Scheduled(fixedRate = 1000 * 60)
|
||||||
public void saveToEs() {
|
public void saveToEs() {
|
||||||
if (cacheService.get(CacheKey.ES_TRANS_LOCK) == null) {
|
if (cacheService.get(CacheKey.ES_TRANS_LOCK) == null) {
|
||||||
cacheService.set(CacheKey.ES_TRANS_LOCK, "1", 60 * 5);
|
cacheService.set(CacheKey.ES_TRANS_LOCK, "1", 60 * 5);
|
||||||
|
|||||||
Reference in New Issue
Block a user