fix: Remove Stale notification Job
This commit is contained in:
parent
10d0eb063f
commit
37d6430b6a
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ class Migration::RemoveStaleNotificationsJob < ApplicationJob
|
|||
|
||||
def remove_invalid_messages
|
||||
deleted_ids = []
|
||||
Message.distinct.pluck(:inbox_id).each_slice(1000) do |id_list|
|
||||
Message.unscoped.distinct.pluck(:inbox_id).each_slice(1000) do |id_list|
|
||||
deleted_ids << (id_list - Inbox.where(id: id_list).pluck(:id))
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue