Use operations kind
This commit is contained in:
@ -25,20 +25,34 @@ namespace Hcs.WebApp.Services
|
||||
select campaign).ToListAsync();
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Operation>> GetNotExecutedOperationsAsync()
|
||||
public async Task<IEnumerable<Operation>> GetNotExecutedRemoteOperationsAsync()
|
||||
{
|
||||
using var context = GetNewContext();
|
||||
return await (from operation in context.Operations
|
||||
where string.IsNullOrEmpty(operation.MessageGuid) && !operation.EndedAt.HasValue
|
||||
select operation).ToListAsync();
|
||||
var query = from operation in context.Operations
|
||||
where string.IsNullOrEmpty(operation.MessageGuid) && !operation.EndedAt.HasValue
|
||||
select operation;
|
||||
var result = await query.ToListAsync();
|
||||
return result.Where(x => x.Kind == Operation.OperationKind.Remote);
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Operation>> GetResultWaitingOperationsAsync()
|
||||
public async Task<IEnumerable<Operation>> GetResultWaitingRemoteOperationsAsync()
|
||||
{
|
||||
using var context = GetNewContext();
|
||||
return await (from operation in context.Operations
|
||||
where !string.IsNullOrEmpty(operation.MessageGuid) && !operation.EndedAt.HasValue
|
||||
select operation).ToListAsync();
|
||||
var query = from operation in context.Operations
|
||||
where !string.IsNullOrEmpty(operation.MessageGuid) && !operation.EndedAt.HasValue
|
||||
select operation;
|
||||
var result = await query.ToListAsync();
|
||||
return result.Where(x => x.Kind == Operation.OperationKind.Remote);
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Operation>> GetNotCompletedParseOperationsAsync()
|
||||
{
|
||||
using var context = GetNewContext();
|
||||
var query = from operation in context.Operations
|
||||
where !operation.EndedAt.HasValue
|
||||
select operation;
|
||||
var result = await query.ToListAsync();
|
||||
return result.Where(x => x.Kind == Operation.OperationKind.Parse);
|
||||
}
|
||||
|
||||
public async Task<ICollection<Operation>> GetOperationsAsync()
|
||||
|
||||
Reference in New Issue
Block a user