.NET API
TraconDrainOptions
Tracon.Core.dllGraceful-shutdown draining settings.
public sealed class TraconDrainOptions- Inheritance
- object ← TraconDrainOptions
- 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). Two
backup mechanisms actually carry that guarantee: the HTTP host’s own
Kestrel request draining, and the job worker’s own
WaitForRunningJobsAsync drain loop. A setup that relies on this
flag alone, without one of those two layers in its own request path,
has no closed guarantee against a run starting in that narrow window.
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.
Must be from one millisecond to about 49.7 days; any other value fails at startup.