From 0adadf77fad9038fabf23fdf5c75d88aad3d9058 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Mon, 1 Jul 2024 10:28:34 +0200 Subject: [PATCH] fix(helpscout): rate limit compared to integer Signed-off-by: Colin Darie --- .../maintenance/helpscout_delete_old_conversations_task.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/tasks/maintenance/helpscout_delete_old_conversations_task.rb b/app/tasks/maintenance/helpscout_delete_old_conversations_task.rb index 6cd65260a..b7256028f 100644 --- a/app/tasks/maintenance/helpscout_delete_old_conversations_task.rb +++ b/app/tasks/maintenance/helpscout_delete_old_conversations_task.rb @@ -14,7 +14,7 @@ module Maintenance throttle_on do 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 def count