Initial commit

This commit is contained in:
Yaser
2026-08-13 19:56:46 +03:30
commit de1d57a67b
474 changed files with 43185 additions and 0 deletions

24
lib/tasks/rotate.rake Normal file
View File

@@ -0,0 +1,24 @@
#frozen_string_literal: true
namespace :rotate do
desc 'Rotate profile keys'
task profiles: :environment do
Profile.find_each(batch_size: 100) do |profile|
profile.update({})
end
end
desc 'Rotate phones keys'
task phones: :environment do
Phone.find_each(batch_size: 100) do |phone|
phone.update({})
end
end
desc 'Rotate documents keys'
task documents: :environment do
Document.where.not(doc_number_encrypted: nil).find_each(batch_size: 100) do |document|
document.update({})
end
end
end