TsgcWSCircuitBreakerMethods › ForceClose

ForceClose Method

Manually moves the circuit for the given key back to the Closed state.

Syntax

procedure ForceClose(const aKey: string);

Parameters

NameTypeDescription
aKeyconst stringCircuit key to force Closed — usually the hostname of the upstream service.

Remarks

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.

Example

// Operator knows api.openai.com is back online; resume traffic now
sgcWSCircuitBreaker1.ForceClose('api.openai.com');

Back to Methods