Skip to content

Commit

Permalink
chore: disable circuit breaker on helix ban api (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
iProdigy committed May 15, 2022
1 parent 73e16a1 commit 7cb737c
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -147,6 +147,10 @@ public TwitchHelix build() {
ConfigurationManager.getConfigInstance().setProperty("hystrix.threadpool.default.maxQueueSize", getRequestQueueSize());
ConfigurationManager.getConfigInstance().setProperty("hystrix.threadpool.default.queueSizeRejectionThreshold", getRequestQueueSize());

// Hystrix: Ban/Unban API already has special 429 logic such that circuit breaking is not needed (and just trips on trivial errors like 'user is already banned')
ConfigurationManager.getConfigInstance().setProperty("hystrix.command.TwitchHelix#banUser(String,String,String,BanUserInput).circuitBreaker.enabled", false);
ConfigurationManager.getConfigInstance().setProperty("hystrix.command.TwitchHelix#unbanUser(String,String,String,String).circuitBreaker.enabled", false);

// Warning
if (logLevel == Logger.Level.HEADERS || logLevel == Logger.Level.FULL) {
log.warn("Helix: The current feign loglevel will print sensitive information including your access token, please don't share this log!");
Expand Down

0 comments on commit 7cb737c

Please sign in to comment.