All Downloads are FREE. Search and download functionalities are using the official Maven repository.

.gateleen.gateleen-queue.2.1.11.source-code.circuitbreaker_reopen.lua Maven / Gradle / Ivy

There is a newer version: 2.1.12
Show newest version
local stateField = "state"

local circuitInfoKey = KEYS[1]
local halfOpenCircuitsKey = KEYS[2]
local openCircuitsKey = KEYS[3]

local circuitHash = ARGV[1]

-- reset circuit infos
redis.call('hset',circuitInfoKey,stateField,"open")

-- remove circuit from half-open-circuits set
redis.call('srem',halfOpenCircuitsKey,circuitHash)

-- add circuit to open-circuits set
redis.call('sadd',openCircuitsKey,circuitHash)

return "OK"




© 2015 - 2024 Weber Informatics LLC | Privacy Policy