TsgcWSCircuitBreaker › Methods › Reset
Clears the state, rolling-window counters and last-success payload for a single key.
procedure Reset(const aKey: string);
| Name | Type | Description |
|---|---|---|
aKey | const string | Circuit key to reset — usually the hostname of the upstream service. |
Clears the per-key rolling-window counters, resets the state back to Closed and drops any cached last-success payload held for Fallback.UseLastSuccess. Aggregate Metrics counters are not affected — use ResetAll to zero them too. OnStateChange fires when the key was not already Closed. Typical use: after correcting a configuration or after a known-transient incident ends, reset the affected key so it starts fresh without waiting for the rolling window to expire.
// Incident for api.openai.com is resolved — start from a clean slate
sgcWSCircuitBreaker1.Reset('api.openai.com');