首页v2-定时任务-定时清理空麦位房间
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package com.accompany.scheduler.task;
|
||||
|
||||
import com.accompany.business.service.homeV2.HomeV2Service;
|
||||
import com.accompany.core.enumeration.PartitionEnum;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class HomeV2ListTask {
|
||||
|
||||
@Autowired
|
||||
private HomeV2Service homeV2Service;
|
||||
|
||||
/**
|
||||
* 缓存当前有效的表情JSON
|
||||
*/
|
||||
@Scheduled(cron = "0 */6 * * * ?")
|
||||
public void cacheFaceJson() {
|
||||
for (PartitionEnum partitionEnum : PartitionEnum.values()) {
|
||||
homeV2Service.clearPartitionPoolSet(partitionEnum.getId());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user