Add current limits to the error message

This commit is contained in:
Alex Sherman 2021-12-05 14:06:13 +05:00 committed by olegphenomenon
parent 16d4e4b4e6
commit dbe1678430
6 changed files with 11 additions and 3 deletions

View file

@ -9,6 +9,10 @@ module Shunter
BASE_CONNECTION = ENV['shunter_redis_connection'] || { host: 'redis', port: 6379 }
def default_error_message
"Session limit exceeded. Current limit is #{default_threshold} in #{default_timespan} seconds"
end
def default_timespan
ENV['shunter_default_timespan'] || ONE_MINUTE
end