Removed AdminMailer emails for reports and pending accounts

• Removed:
- AdminMailer emails for reports and pending accounts
This commit is contained in:
mgabdev
2020-05-28 19:30:37 -04:00
parent 536c94e625
commit ce69d939b7
2 changed files with 0 additions and 19 deletions

View File

@@ -144,8 +144,6 @@ class User < ApplicationRecord
if new_user && approved?
prepare_new_user!
elsif new_user
notify_staff_about_pending_account!
end
end
@@ -319,13 +317,6 @@ class User < ApplicationRecord
regenerate_feed! if needs_feed_update?
end
def notify_staff_about_pending_account!
User.staff.includes(:account).each do |u|
next unless u.allows_pending_account_emails?
AdminMailer.new_pending_account(u.account, self).deliver_later
end
end
def regenerate_feed!
return unless Redis.current.setnx("account:#{account_id}:regeneration", true)
Redis.current.expire("account:#{account_id}:regeneration", 1.day.seconds)