Skip to content

Commit 7842185

Browse files
authored
Extend CancellationToken (#653)
1 parent 4f38e21 commit 7842185

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/TriggerService.Tests/UpdateWorkflowStatusTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ private static TesTask GetTesTask(string workflowId, int shard, int attempt, par
393393
.Returns(Task.FromResult(new GetTimingResponse()));
394394

395395
repository
396-
.Setup(r => r.GetItemsAsync(It.IsAny<Expression<Func<TesTask, bool>>>()))
396+
.Setup(r => r.GetItemsAsync(It.IsAny<Expression<Func<TesTask, bool>>>(), It.IsAny<System.Threading.CancellationToken>()))
397397
.Returns(Task.FromResult(tesTasks));
398398

399399
var logger = new Mock<ILogger<TriggerHostedService>>().Object;

src/TriggerService/TriggerHostedService.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ private async Task<WorkflowFailureInfo> GetWorkflowFailureInfoAsync(Guid workflo
546546
}
547547
}
548548

549-
var tesTasks = await tesTaskRepository.GetItemsAsync(t => t.WorkflowId == workflowId.ToString());
549+
var tesTasks = await tesTaskRepository.GetItemsAsync(t => t.WorkflowId == workflowId.ToString(), CancellationToken.None);
550550

551551
// Select the last attempt of each Cromwell task, and then select only the failed ones
552552
// If CromwellResultCode is > 0, point to Cromwell stderr/out. Otherwise, if batch exit code > 0, point to Batch stderr/out
@@ -589,7 +589,7 @@ private async Task<WorkflowFailureInfo> GetWorkflowFailureInfoAsync(Guid workflo
589589

590590
private async Task<List<TaskWarning>> GetWorkflowTaskWarningsAsync(Guid workflowId)
591591
{
592-
var tesTasks = await tesTaskRepository.GetItemsAsync(t => t.WorkflowId == workflowId.ToString());
592+
var tesTasks = await tesTaskRepository.GetItemsAsync(t => t.WorkflowId == workflowId.ToString(), CancellationToken.None);
593593

594594
// Select the last attempt of each Cromwell task, and then select only those that have a warning
595595
var taskWarnings = tesTasks

src/ga4gh-tes

Submodule ga4gh-tes updated 62 files

0 commit comments

Comments
 (0)