From 80ff5e2d0a1991ba1969a9552b7255518c69bc0c Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Mon, 11 Dec 2023 08:27:30 +0530 Subject: [PATCH] chore: Change the `RemoveMessageNotifications` job implementation. (#8521) --- app/jobs/migration/remove_message_notifications.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/migration/remove_message_notifications.rb b/app/jobs/migration/remove_message_notifications.rb index df4de54c5..7075257e9 100644 --- a/app/jobs/migration/remove_message_notifications.rb +++ b/app/jobs/migration/remove_message_notifications.rb @@ -3,6 +3,6 @@ class Migration::RemoveMessageNotifications < ApplicationJob queue_as :scheduled_jobs def perform - Notification.where(primary_actor_type: 'Message').in_batches(of: 100).each_record(&:destroy) + Notification.where(primary_actor_type: 'Message').in_batches(of: 100).delete_all end end