Files
leadchat/app/jobs/internal/process_stale_redis_keys_job.rb
Vishnu Narayanan 9a405d65ba fix: RemoveStaleRedisKeys service (#10562)
Fixes issues with RemoveStaleRedisKeys service

Co-authored-by: Sojan <sojan@pepalo.com>
2024-12-11 03:38:25 +08:00

13 lines
427 B
Ruby

# housekeeping
# remove contact inboxes that does not have any conversations
# and are older than 3 months
class Internal::ProcessStaleRedisKeysJob < ApplicationJob
queue_as :low
def perform(account)
removed_count = Internal::RemoveStaleRedisKeysService.new(account_id: account.id).perform
Rails.logger.info "Successfully cleaned up Redis keys for account #{account.id} (removed #{removed_count} keys)"
end
end