|
|
@ -34,8 +34,8 @@ public class CustomerImpressionTask {
|
|
|
|
private ThreadPoolExecutor generatePool = new ThreadPoolExecutor(10, 30, 5, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>());
|
|
|
|
private ThreadPoolExecutor generatePool = new ThreadPoolExecutor(10, 30, 5, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>());
|
|
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "0 30 3 * * ?")
|
|
|
|
@Scheduled(cron = "0 30 3 * * ?")
|
|
|
|
public void generateTags() {
|
|
|
|
public void customerImpressionGenerateTags() {
|
|
|
|
synchronizedScheduler.executeProcess("manage_task:CustomerImpression", 120_000, () -> {
|
|
|
|
synchronizedScheduler.executeProcess("manage_task:customerImpressionGenerateTags", 120_000, () -> {
|
|
|
|
List<JSONObject> clients = clientMapper.listValidClient();
|
|
|
|
List<JSONObject> clients = clientMapper.listValidClient();
|
|
|
|
List<List<JSONObject>> splitList = new ArrayList<>();
|
|
|
|
List<List<JSONObject>> splitList = new ArrayList<>();
|
|
|
|
for (int i = 0; i < clients.size(); i += 200) {
|
|
|
|
for (int i = 0; i < clients.size(); i += 200) {
|
|
|
@ -57,7 +57,7 @@ public class CustomerImpressionTask {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "0/1 * * * * ?")
|
|
|
|
@Scheduled(cron = "0/1 * * * * ?")
|
|
|
|
public void generateInfo() {
|
|
|
|
public void customerImpressionGenerateInfo() {
|
|
|
|
synchronizedScheduler.executeProcess("manage_task:CustomerImpression", 1_000, () -> customerImpressionService.generateInfo());
|
|
|
|
synchronizedScheduler.executeProcess("manage_task:CustomerImpression", 1_000, () -> customerImpressionService.generateInfo());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|