|
|
@@ -222,8 +222,8 @@ public class AdqCreativeCreativeReportServiceImpl implements IAdqCreativeReportS
|
|
|
log.info("开始执行创意报表定时批处理任务....");
|
|
|
synchronized (creativeReportHourBuffer) {
|
|
|
long now = System.currentTimeMillis();
|
|
|
- if (creativeReportHourBuffer.size() >= MAX_BATCH_SIZE ||
|
|
|
- (now - creativeReportHourLastFlushTime) >= MAX_WAIT_TIME_MS && !creativeReportHourBuffer.isEmpty()) {
|
|
|
+ // creativeReportHourBuffer.size() >= MAX_BATCH_SIZE || (now - creativeReportHourLastFlushTime) >= MAX_WAIT_TIME_MS &&
|
|
|
+ if (!creativeReportHourBuffer.isEmpty()) {
|
|
|
try {
|
|
|
long startTime = System.currentTimeMillis();
|
|
|
adqReportMapper.addsHourListSD(new ArrayList<>(creativeReportHourBuffer));
|
|
|
@@ -244,8 +244,8 @@ public class AdqCreativeCreativeReportServiceImpl implements IAdqCreativeReportS
|
|
|
|
|
|
synchronized (creativeReportDailyBuffer) {
|
|
|
long now = System.currentTimeMillis();
|
|
|
- if (creativeReportDailyBuffer.size() >= MAX_BATCH_SIZE ||
|
|
|
- (now - creativeReportDailyLastFlushTime) >= MAX_WAIT_TIME_MS && !creativeReportDailyBuffer.isEmpty()) {
|
|
|
+ // creativeReportDailyBuffer.size() >= MAX_BATCH_SIZE || (now - creativeReportDailyLastFlushTime) >= MAX_WAIT_TIME_MS &&
|
|
|
+ if ( !creativeReportDailyBuffer.isEmpty()) {
|
|
|
try {
|
|
|
long startTime = System.currentTimeMillis();
|
|
|
adqReportMapper.addsDailySD(new ArrayList<>(creativeReportDailyBuffer));
|
|
|
@@ -297,4 +297,8 @@ public class AdqCreativeCreativeReportServiceImpl implements IAdqCreativeReportS
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static void main(String[] args) {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|