feat(data): add TaskRepository.ResetToManualAsync
This commit is contained in:
@@ -98,6 +98,17 @@ public sealed class TaskRepository
|
||||
.SetProperty(t => t.Result, resultText), ct);
|
||||
}
|
||||
|
||||
public async Task ResetToManualAsync(string taskId, CancellationToken ct = default)
|
||||
{
|
||||
await _context.Tasks
|
||||
.Where(t => t.Id == taskId)
|
||||
.ExecuteUpdateAsync(s => s
|
||||
.SetProperty(t => t.Status, TaskStatus.Manual)
|
||||
.SetProperty(t => t.StartedAt, (DateTime?)null)
|
||||
.SetProperty(t => t.FinishedAt, (DateTime?)null)
|
||||
.SetProperty(t => t.Result, (string?)null), ct);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Tags
|
||||
|
||||
Reference in New Issue
Block a user