feat(esg): per-system TimeoutSeconds column on ExternalSystemDefinition (spec Component-ExternalSystemGateway Timeout) — entity + EF + migration
Claude-Session: https://claude.ai/code/session_01MtdgwpEeCUn6cUA5f1LMPj
This commit is contained in:
@@ -17,6 +17,13 @@ public class ExternalSystemDefinition
|
||||
/// <summary>Fixed delay between retry attempts.</summary>
|
||||
public TimeSpan RetryDelay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Per-system HTTP round-trip timeout in seconds for all method calls
|
||||
/// (spec: Component-ExternalSystemGateway "Timeout"). 0 = unset — the gateway's
|
||||
/// configured DefaultHttpTimeout applies.
|
||||
/// </summary>
|
||||
public int TimeoutSeconds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new <see cref="ExternalSystemDefinition"/>.
|
||||
/// </summary>
|
||||
|
||||
+2
@@ -29,6 +29,8 @@ public class ExternalSystemDefinitionConfiguration : IEntityTypeConfiguration<Ex
|
||||
builder.Property(e => e.AuthConfiguration)
|
||||
.HasMaxLength(8000);
|
||||
|
||||
builder.Property(e => e.TimeoutSeconds).HasDefaultValue(0);
|
||||
|
||||
builder.HasMany<ExternalSystemMethod>()
|
||||
.WithOne()
|
||||
.HasForeignKey(m => m.ExternalSystemDefinitionId)
|
||||
|
||||
+2020
File diff suppressed because it is too large
Load Diff
+29
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace ZB.MOM.WW.ScadaBridge.ConfigurationDatabase.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddExternalSystemTimeoutSeconds : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "TimeoutSeconds",
|
||||
table: "ExternalSystemDefinitions",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TimeoutSeconds",
|
||||
table: "ExternalSystemDefinitions");
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
@@ -418,6 +418,11 @@ namespace ZB.MOM.WW.ScadaBridge.ConfigurationDatabase.Migrations
|
||||
b.Property<TimeSpan>("RetryDelay")
|
||||
.HasColumnType("time");
|
||||
|
||||
b.Property<int>("TimeoutSeconds")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Name")
|
||||
|
||||
Reference in New Issue
Block a user