|
@@ -97,8 +97,7 @@ public class ApptaskDomainService : IApptaskDomainService, IScopeDependency
|
|
|
public async Task<bool> IsCompletedAsync(string taskId, CancellationToken cancellation)
|
|
|
{
|
|
|
var anyUnCompleted = await _apptaskItemRepository.Queryable()
|
|
|
- .AnyAsync(d => d.Tries < d.TryLimit
|
|
|
- && (d.TaskStatus == ETaskStatus.Waiting || d.TaskStatus == ETaskStatus.Processing)
|
|
|
+ .AnyAsync(d => (d.TaskStatus == ETaskStatus.Waiting || d.TaskStatus == ETaskStatus.Processing)
|
|
|
&& d.ApptaskId == taskId, cancellation);
|
|
|
return !anyUnCompleted;
|
|
|
}
|
|
@@ -179,7 +178,7 @@ public class ApptaskDomainService : IApptaskDomainService, IScopeDependency
|
|
|
throw new UserFriendlyException($"任务参数反序列化失败, taskItemId: {apptaskItem.Id}");
|
|
|
|
|
|
_sessionContextManager.ChangeSessionContext(request.SessionContext);
|
|
|
-
|
|
|
+
|
|
|
//if (request is IApptaskRequest reqWithSession)
|
|
|
// _sessionContextProvider.ChangeSession(reqWithSession.SessionContext);
|
|
|
var result = await executor.ExecuteAsync(request, cancellation);
|