Skip to content

Using only a threshold doesn't work

Hi there! If I define only a threshold strategy, I'v got an error:

RedisPrescription::ScriptError:
       missing strategies
     # /usr/local/bundle/ruby/3.1.0/gems/redis-prescription-2.6.0/lib/redis_prescription.rb:51:in `rescue in call'
     # /usr/local/bundle/ruby/3.1.0/gems/redis-prescription-2.6.0/lib/redis_prescription.rb:48:in `call'
     # /usr/local/bundle/ruby/3.1.0/gems/redis-throttle-2.0.0/lib/redis_throttle/api.rb:84:in `execute'
     # /usr/local/bundle/ruby/3.1.0/gems/redis-throttle-2.0.0/lib/redis_throttle/api.rb:44:in `release'
     # /usr/local/bundle/ruby/3.1.0/gems/redis-throttle-2.0.0/lib/redis_throttle.rb:271:in `release'
     # /usr/local/bundle/ruby/3.1.0/gems/redis-throttle-2.0.0/lib/redis_throttle.rb:225:in `call'

Is it expected? https://gitlab.com/ixti/redis-throttle/-/blob/main/lib/redis_throttle/api.rb?ref_type=heads#L44