优化后台业务
This commit is contained in:
-5
@@ -23,7 +23,6 @@ public class TaskFileJobService {
|
||||
private final TaskFileJobMapper taskFileJobMapper;
|
||||
private final ApplicationEventPublisher applicationEventPublisher;
|
||||
|
||||
@Transactional
|
||||
public TaskFileJobEntity enqueueAssembleResult(Long taskId, String moduleType, Long resultId, String scopeKey) {
|
||||
if (taskId == null || taskId <= 0 || moduleType == null || moduleType.isBlank() || resultId == null || resultId <= 0) {
|
||||
return null;
|
||||
@@ -146,7 +145,6 @@ public class TaskFileJobService {
|
||||
return reset;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public boolean markRunning(Long jobId) {
|
||||
if (jobId == null || jobId <= 0) {
|
||||
return false;
|
||||
@@ -158,7 +156,6 @@ public class TaskFileJobService {
|
||||
.set(TaskFileJobEntity::getUpdatedAt, LocalDateTime.now())) > 0;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void touchRunning(Long jobId) {
|
||||
if (jobId == null || jobId <= 0) {
|
||||
return;
|
||||
@@ -169,7 +166,6 @@ public class TaskFileJobService {
|
||||
.set(TaskFileJobEntity::getUpdatedAt, LocalDateTime.now()));
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void markSuccess(TaskFileJobEntity job, String resultFileUrl) {
|
||||
taskFileJobMapper.update(null, new LambdaUpdateWrapper<TaskFileJobEntity>()
|
||||
.eq(TaskFileJobEntity::getId, job.getId())
|
||||
@@ -180,7 +176,6 @@ public class TaskFileJobService {
|
||||
.set(TaskFileJobEntity::getFinishedAt, LocalDateTime.now()));
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void markFailed(TaskFileJobEntity job, String message) {
|
||||
int retryCount = job.getRetryCount() == null ? 0 : job.getRetryCount() + 1;
|
||||
taskFileJobMapper.update(null, new LambdaUpdateWrapper<TaskFileJobEntity>()
|
||||
|
||||
-2
@@ -25,7 +25,6 @@ public class TaskResultItemService {
|
||||
private final ObjectMapper objectMapper;
|
||||
private final TransientPayloadStorageService transientPayloadStorageService;
|
||||
|
||||
@Transactional
|
||||
public void replaceResultSnapshot(Long taskId, String moduleType, Long resultId, String scopeKey, Object snapshot) {
|
||||
if (taskId == null || taskId <= 0 || isBlank(moduleType) || resultId == null || resultId <= 0 || snapshot == null) {
|
||||
return;
|
||||
@@ -35,7 +34,6 @@ public class TaskResultItemService {
|
||||
upsert(taskId, moduleType, resultId, normalizedScopeKey, itemKey, null, null, null, snapshot);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void replaceTaskSnapshots(Long taskId, String moduleType, List<? extends Object> snapshots, SnapshotKeyResolver resolver) {
|
||||
if (taskId == null || taskId <= 0 || isBlank(moduleType) || snapshots == null) {
|
||||
return;
|
||||
|
||||
-1
@@ -25,7 +25,6 @@ public class TaskResultPayloadService {
|
||||
private final ObjectMapper objectMapper;
|
||||
private final TransientPayloadStorageService transientPayloadStorageService;
|
||||
|
||||
@Transactional
|
||||
public void saveLatest(Long taskId, String moduleType, String scopeKey, Object payload) {
|
||||
if (taskId == null || taskId <= 0 || isBlank(moduleType) || isBlank(scopeKey) || payload == null) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user