后端优化,增加新需求

This commit is contained in:
super
2026-07-21 19:53:47 +08:00
parent 05e674858a
commit 48e3c330ee
16 changed files with 529 additions and 61 deletions
@@ -115,6 +115,7 @@ public class TaskResultFileJobWorker {
private void processInternal(TaskFileJobEntity job) {
long startedAt = System.currentTimeMillis();
boolean finalizeWithdraw = false;
try {
TaskFileJobEntity latest = taskFileJobService.findById(job.getId());
if (latest != null && "SUCCESS".equals(latest.getStatus())) {
@@ -162,10 +163,14 @@ public class TaskResultFileJobWorker {
String resultFileUrl = resolveResultFileUrl(job);
taskFileJobService.markSuccess(job, resultFileUrl);
cleanupAfterSuccess(job);
finalizeWithdraw = "WITHDRAW".equals(job.getModuleType());
log.info("[task-file-job] process success jobId={} taskId={} moduleType={} resultId={} elapsedMs={} resultFileUrl={}",
job.getId(), job.getTaskId(), job.getModuleType(), job.getResultId(),
System.currentTimeMillis() - startedAt, resultFileUrl);
}
if (finalizeWithdraw) {
withdrawTaskService.tryFinalizeTask(job.getTaskId(), false);
}
} catch (Exception ex) {
TaskFileJobEntity latest = taskFileJobService.findById(job.getId());
if (latest != null && "SUCCESS".equals(latest.getStatus())) {