Skip to content

Commit 7d4094d

Browse files
committed
Search by completed time
1 parent 91f406f commit 7d4094d

File tree

15 files changed

+1138
-1
lines changed

15 files changed

+1138
-1
lines changed

src/LLL.DurableTask.Core/ExtendedOrchestrationQuery.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using System.Collections.Generic;
23
using DurableTask.Core.Query;
34

@@ -6,6 +7,8 @@ namespace LLL.DurableTask.Core
67
public class ExtendedOrchestrationQuery : OrchestrationQuery
78
{
89
public string NamePrefix { get; set; }
10+
public DateTime? CompletedTimeFrom { get; set; }
11+
public DateTime? CompletedTimeTo { get; set; }
912
public bool IncludePreviousExecutions { get; set; }
1013
public Dictionary<string, string> Tags { get; } = new Dictionary<string, string>();
1114
}

src/LLL.DurableTask.EFCore.MySql/Migrations/20230809064638_IndexCompletedTime.Designer.cs

Lines changed: 341 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using Microsoft.EntityFrameworkCore.Migrations;
2+
3+
#nullable disable
4+
5+
namespace LLL.DurableTask.EFCore.MySql.Migrations
6+
{
7+
/// <inheritdoc />
8+
public partial class IndexCompletedTime : Migration
9+
{
10+
/// <inheritdoc />
11+
protected override void Up(MigrationBuilder migrationBuilder)
12+
{
13+
migrationBuilder.CreateIndex(
14+
name: "IX_Executions_CompletedTime",
15+
table: "Executions",
16+
column: "CompletedTime");
17+
}
18+
19+
/// <inheritdoc />
20+
protected override void Down(MigrationBuilder migrationBuilder)
21+
{
22+
migrationBuilder.DropIndex(
23+
name: "IX_Executions_CompletedTime",
24+
table: "Executions");
25+
}
26+
}
27+
}

src/LLL.DurableTask.EFCore.MySql/Migrations/OrchestrationDbContextModelSnapshot.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ protected override void BuildModel(ModelBuilder modelBuilder)
157157

158158
b.HasKey("ExecutionId");
159159

160+
b.HasIndex("CompletedTime");
161+
160162
b.HasIndex("CreatedTime");
161163

162164
b.HasIndex("InstanceId");

0 commit comments

Comments
 (0)