Skip to content

Commit d9870d8

Browse files
committed
rename function
Signed-off-by: Lillie Dae <[email protected]>
1 parent 83d22c0 commit d9870d8

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/WorkflowManager/Database/Interfaces/ITaskExecutionStatsRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public interface ITaskExecutionStatsRepository
103103
/// <param name="workflowId">optional workflow id.</param>
104104
/// <param name="taskId">optional task id.</param>
105105
/// <returns>All stats that failed or partially failed</returns>
106-
Task<long> GetStatsTotalRanExecutionsCountAsync(DateTime startTime, DateTime endTime, string workflowId = "", string taskId = "");
106+
Task<long> GetStatsTotalCompleteExecutionsCountAsync(DateTime startTime, DateTime endTime, string workflowId = "", string taskId = "");
107107

108108

109109
/// <summary>

src/WorkflowManager/Database/Repositories/TaskExecutionStatsRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public async Task<long> GetStatsCountAsync(DateTime startTime, DateTime endTime,
241241
return await _taskExecutionStatsCollection.CountDocumentsAsync(filter);
242242
}
243243

244-
public async Task<long> GetStatsTotalRanExecutionsCountAsync(DateTime startTime, DateTime endTime, string workflowId = "", string taskId = "")
244+
public async Task<long> GetStatsTotalCompleteExecutionsCountAsync(DateTime startTime, DateTime endTime, string workflowId = "", string taskId = "")
245245
{
246246
var dispatched = TaskExecutionStatus.Dispatched.ToString();
247247
var created = TaskExecutionStatus.Created.ToString();

src/WorkflowManager/WorkflowManager/Controllers/TaskStatsController.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,12 @@ public async Task<IActionResult> GetStatsAsync([FromQuery] TimeFilter filter, st
158158

159159
var fails = _repository.GetStatsStatusFailedCountAsync(filter.StartTime, filter.EndTime, workflowId, taskId);
160160

161-
var rangeCount = _repository.GetStatsTotalRanExecutionsCountAsync(filter.StartTime, filter.EndTime, workflowId, taskId);
161+
var rangeCount = _repository.GetStatsTotalCompleteExecutionsCountAsync(filter.StartTime, filter.EndTime, workflowId, taskId);
162162

163163
var stats = _repository.GetAverageStats(filter.StartTime, filter.EndTime, workflowId, taskId);
164164

165165
var running = _repository.GetStatsStatusCountAsync(filter.StartTime, filter.EndTime, TaskExecutionStatus.Accepted.ToString(), workflowId, taskId);
166166

167-
168167
await Task.WhenAll(allStats, fails, rangeCount, stats, running);
169168

170169
ExecutionStatDTO[] statsDto;

tests/UnitTests/WorkflowManager.Tests/Controllers/TaskExecutionStatsControllerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public ExecutionStatsControllerTests()
6666
};
6767
_repo.Setup(w => w.GetStatsAsync(It.IsAny<DateTime>(), It.IsAny<DateTime>(), It.IsAny<int>(), It.IsAny<int>(), It.IsAny<string>(), It.IsAny<string>())).ReturnsAsync(_executionStats);
6868
_repo.Setup(w => w.GetStatsStatusCountAsync(It.IsAny<DateTime>(), It.IsAny<DateTime>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>())).ReturnsAsync(_executionStats.Count());
69-
_repo.Setup(w => w.GetStatsTotalRanExecutionsCountAsync(It.IsAny<DateTime>(), It.IsAny<DateTime>(), It.IsAny<string>(), It.IsAny<string>())).ReturnsAsync(_executionStats.Count());
69+
_repo.Setup(w => w.GetStatsTotalCompleteExecutionsCountAsync(It.IsAny<DateTime>(), It.IsAny<DateTime>(), It.IsAny<string>(), It.IsAny<string>())).ReturnsAsync(_executionStats.Count());
7070
}
7171

7272
[Fact]

0 commit comments

Comments
 (0)