TsgcWSCircuitBreaker › Methods › ForceClose
Manually moves the circuit for the given key back to the Closed state.
procedure ForceClose(const aKey: string);
| Name | Type | Description |
|---|---|---|
aKey | const string | Circuit key to force Closed — usually the hostname of the upstream service. |
Operator override that pushes the circuit directly to the Closed state, ending any cooldown or HalfOpen probe in progress. Rolling-window counters are cleared when Recovery.AutoReset is True (the default) so the next evaluation starts with a clean slate. OnStateChange fires with the new state. Use when you know an upstream has recovered and want to resume traffic immediately instead of waiting for CooldownSec to elapse; or as the final step after ForceOpen during a maintenance window.
// Operator knows api.openai.com is back online; resume traffic now
sgcWSCircuitBreaker1.ForceClose('api.openai.com');