|
@@ -16,7 +16,7 @@ import java.util.concurrent.TimeUnit;
|
|
|
* 服务端还要做落盘、MD5 去重、表格解析(大 Excel 可能几十秒)、文档样本抽取。
|
|
* 服务端还要做落盘、MD5 去重、表格解析(大 Excel 可能几十秒)、文档样本抽取。
|
|
|
* 这段时间前端没有新进度、也没有 SSE 事件,排障时容易误判为「连接断了/请求卡死」。
|
|
* 这段时间前端没有新进度、也没有 SSE 事件,排障时容易误判为「连接断了/请求卡死」。
|
|
|
*
|
|
*
|
|
|
- * <p>本组件在提取期间按 {@code dm.upload.heartbeat-seconds}(默认 5 秒)打一条 INFO 日志:
|
|
|
|
|
|
|
+ * <p>本组件在提取期间按 {@code zsjz.upload.heartbeat-seconds}(默认 5 秒)打一条 INFO 日志:
|
|
|
*
|
|
*
|
|
|
* <pre>
|
|
* <pre>
|
|
|
* [upload-heartbeat] 提取进行中: name=xxx.xlsx, batchId=123, elapsed=15s(请求连接正常)
|
|
* [upload-heartbeat] 提取进行中: name=xxx.xlsx, batchId=123, elapsed=15s(请求连接正常)
|
|
@@ -29,7 +29,7 @@ import java.util.concurrent.TimeUnit;
|
|
|
@Component
|
|
@Component
|
|
|
public class ExtractionHeartbeat {
|
|
public class ExtractionHeartbeat {
|
|
|
|
|
|
|
|
- /** 心跳间隔(秒),可由 {@code dm.upload.heartbeat-seconds} 覆盖 */
|
|
|
|
|
|
|
+ /** 心跳间隔(秒),可由 {@code zsjz.upload.heartbeat-seconds} 覆盖 */
|
|
|
private final long heartbeatSeconds;
|
|
private final long heartbeatSeconds;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -42,7 +42,7 @@ public class ExtractionHeartbeat {
|
|
|
return thread;
|
|
return thread;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- public ExtractionHeartbeat(@Value("${dm.upload.heartbeat-seconds:5}") long heartbeatSeconds) {
|
|
|
|
|
|
|
+ public ExtractionHeartbeat(@Value("${zsjz.upload.heartbeat-seconds:5}") long heartbeatSeconds) {
|
|
|
this.heartbeatSeconds = Math.max(1, heartbeatSeconds);
|
|
this.heartbeatSeconds = Math.max(1, heartbeatSeconds);
|
|
|
executor.setRemoveOnCancelPolicy(true);
|
|
executor.setRemoveOnCancelPolicy(true);
|
|
|
}
|
|
}
|