Skip to content

Commit

Permalink
DBP-830 More logging
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncolincap committed Aug 26, 2024
1 parent 99b53cb commit 6e79296
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,13 @@ def self.disable_inactive_users
inactive_users.each do |user|
user.update(status: 2)
user.notify_admins_blocked_users_inactivity
puts "Blocked user: #{user.email}"
rescue StandardError => e
puts "Failed to block #{user.email}: #{e.message}"
end
puts "Blocked #{size} inactive users."
end
else
puts 'No inactive users to block.'
end
end

0 comments on commit 6e79296

Please sign in to comment.