fix(helpscout): rate limit compared to integer

Signed-off-by: Colin Darie <colin@darie.eu>
This commit is contained in:
Colin Darie 2024-07-01 10:28:34 +02:00
parent 0d744a0eb7
commit 0adadf77fa
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4

View file

@ -14,7 +14,7 @@ module Maintenance
throttle_on do throttle_on do
limit = Rails.cache.read(Helpscout::API::RATELIMIT_KEY) limit = Rails.cache.read(Helpscout::API::RATELIMIT_KEY)
limit.present? && limit <= 26 # check is made after each page (of 25 elements), and we need 25 calls to delete them all limit.present? && limit.to_i <= 26 # check is made after each page (of 25 elements), and we need 25 calls to delete them all
end end
def count def count