寻找报错

master
Cui YongXing 2024-09-05 22:44:31 +08:00
parent 9e177fec24
commit 8551515a2f
2 changed files with 22 additions and 22 deletions

View File

@ -296,7 +296,7 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
}
long end = System.currentTimeMillis();
log.info("执行时间:{}",end-start);
//log.info("执行时间:{}",end-start);
return null;
}
@ -304,18 +304,18 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
@NotNull
private void getString(Long pageNum,String fieName,String joint,Long basicId,Long newBasicId,Long tableId,HashMap<String, String> map ,Integer num) {
String sqlSelect = " SELECT " + fieName + " FROM " + joint +" limit "+pageNum +","+PAGE_SIZE;
log.info(sqlSelect);
//log.info(sqlSelect);
log.info("执行{}查询的方法",sqlSelect);
//log.info("执行{}查询的方法",sqlSelect);
Result<DataValue[][]> tableValueResult = datasourceFeign.findTableValueToArray(basicId, sqlSelect);
DataValue[][] data = tableValueResult.getData();
if (pageNum==160000){
for (DataValue[] datum : data) {
for (DataValue dataValue : datum) {
System.out.println(dataValue);
}
}
}
// if (pageNum==160000){
// for (DataValue[] datum : data) {
// for (DataValue dataValue : datum) {
// System.out.println(dataValue);
// }
// }
// }
for (DataValue[] datum : data) {
for (DataValue dataValue : datum) {
String key = dataValue.getKey();
@ -323,10 +323,10 @@ public class TaskInfoServiceImpl extends ServiceImpl<TaskInfoMapper, TaskInfo> i
dataValue.setKey(newKey);
}
}
log.info("{}查询结束",sqlSelect);
log.info("执行{}添加的方法",sqlSelect);
//log.info("{}查询结束",sqlSelect);
//log.info("执行{}添加的方法",sqlSelect);
Result result = datasourceFeign.addProduct(newBasicId, tableId, data);
log.info("{}添加结束",sqlSelect);
//log.info("{}添加结束",sqlSelect);
// for (List<DataValue> dataValues : tableValue) {
// for (DataValue dataValue : dataValues) {
// String key = dataValue.getKey();

View File

@ -57,7 +57,9 @@ public class OptimizedPrioritizedThreadPool {
emergencySemaphore.acquire();
executor.submit(() -> {
try {
System.out.println("Starting emergency task...");
task.run();
System.out.println("Finished emergency task.");
} finally {
emergencySemaphore.release();
if (remainingTasks.decrementAndGet() == 0) {
@ -76,7 +78,9 @@ public class OptimizedPrioritizedThreadPool {
highPrioritySemaphore.acquire();
executor.submit(() -> {
try {
System.out.println("Starting high priority task...");
task.run();
System.out.println("Finished high priority task.");
} finally {
highPrioritySemaphore.release();
}
@ -92,7 +96,9 @@ public class OptimizedPrioritizedThreadPool {
mediumPrioritySemaphore.acquire();
executor.submit(() -> {
try {
System.out.println("Starting medium priority task...");
task.run();
System.out.println("Finished medium priority task.");
} finally {
mediumPrioritySemaphore.release();
}
@ -108,7 +114,9 @@ public class OptimizedPrioritizedThreadPool {
lowPrioritySemaphore.acquire();
executor.submit(() -> {
try {
System.out.println("Starting low priority task...");
task.run();
System.out.println("Finished low priority task.");
} finally {
lowPrioritySemaphore.release();
}
@ -159,13 +167,5 @@ public class OptimizedPrioritizedThreadPool {
}
}
public static void shutdown() throws InterruptedException {
executor.shutdown();
if (!executor.awaitTermination(1, TimeUnit.HOURS)) {
executor.shutdownNow();
if (!executor.awaitTermination(1, TimeUnit.MINUTES)) {
System.err.println("Pool did not terminate");
}
}
}
// 移除shutdown方法
}