.NET API
TraconDrainOptions
Tracon.Core.dllGraceful-shutdown draining settings.
public sealed class TraconDrainOptionsInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”Read from the Tracon:Drain configuration section. See
TraconServiceCollectionExtensions.AddTracon.
Constructors
Section titled “Constructors”TraconDrainOptions()
Section titled “ TraconDrainOptions()”public TraconDrainOptions()Fields
Section titled “Fields”SectionName
Section titled “ SectionName”The configuration section name.
public const string SectionName = "Tracon:Drain"Field Value
Section titled “Field Value”Properties
Section titled “Properties”Enabled
Section titled “ Enabled”Whether draining is on. Defaults to false: today’s behavior (the process stops immediately, in-flight runs are cut off) does not change unless a setup opts in.
public bool Enabled { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Turning this on does not, by itself, close the register/accept race
window a new run can land in right as shutdown begins (BL-026) — see
ITraconDrainState’s remarks for the two backup
mechanisms (Kestrel request draining, the job worker’s own
WaitForRunningJobsAsync) that actually carry that guarantee.
Timeout
Section titled “ Timeout”The longest time to wait for in-flight runs to finish before the process stops anyway.
public TimeSpan Timeout { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The host’s own HostOptions.ShutdownTimeout (default 30 s)
still applies on top of this value and can cut the wait short; a
setup that wants the full wait to take effect raises both together.