Skip to content

Commit

Permalink
fix rubocop issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nfstern02 committed Dec 25, 2024
1 parent d35af40 commit 12b4af2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
10 changes: 8 additions & 2 deletions modules/vye/lib/concerns/vye/cloud_transfer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ def remove_aws_files_from_s3_buckets
def delete_inactive_bdns
bdn_clone_ids = Vye::BdnClone.where(is_active: nil, export_ready: nil).pluck(:id)
bdn_clone_ids.each do |bdn_clone_id|
Rails.logger.info("Vye::SundownSweep::ClearDeactivatedBdns#delete_inactive_bdns: processing BdnClone(#{bdn_clone_id})")
Rails.logger.info(
"Vye::SundownSweep::ClearDeactivatedBdns#delete_inactive_bdns: processing BdnClone(#{bdn_clone_id})"
)

Rails.logger.info('Vye::SundownSweep::ClearDeactivatedBdns#delete_inactive_bdns: deleting DirectDepositChanges')
Vye::DirectDepositChange.joins(:user_info).where(vye_user_infos: { bdn_clone_id: }).in_batches.delete_all
Rails.logger.info('Vye::SundownSweep::ClearDeactivatedBdns#delete_inactive_bdns: deleting AddressChanges')
Expand All @@ -165,7 +168,10 @@ def delete_inactive_bdns

# We're not worried about validations here because it wouldn't be in the table if it wasn't valid
# rubocop:disable Rails/SkipsModelValidations
Rails.logger.info('Vye::SundownSweep::ClearDeactivatedBdns#delete_inactive_bdns: nullifying verification references')
Rails.logger.info(
'Vye::SundownSweep::ClearDeactivatedBdns#delete_inactive_bdns: nullifying verification references'
)

Vye::Verification
.joins(:user_info)
.where(vye_user_infos: { bdn_clone_id: })
Expand Down
22 changes: 12 additions & 10 deletions modules/vye/lib/tasks/vye/setup_for_sundown_sweep_devtest.rake
Original file line number Diff line number Diff line change
Expand Up @@ -32,36 +32,38 @@ namespace :vye do
Vye.settings.scrypt.salt = '1'

puts 'Creating BdnClone row that will be deleted'
FactoryBot.create(:vye_bdn_clone_with_user_info_children, transact_date: Date.today - 2.days)
FactoryBot.create(:vye_bdn_clone_with_user_info_children, transact_date: Time.Zone.today - 2.days)

puts 'Creating active BdnClone row'
FactoryBot.create(:vye_bdn_clone_with_user_info_children, :active, transact_date: Date.today - 1.days)
FactoryBot.create(
:vye_bdn_clone_with_user_info_children, :active, transact_date: Time.Zone.today - 1.day
)

puts 'Creating freshly imported BdnClone row'
FactoryBot.create(:vye_bdn_clone_with_user_info_children, is_active: false)

puts 'BdnClones created'
Vye::BdnClone.all.each { |bdn_clone| puts bdn_clone.inspect }
Vye::BdnClone.all.find_each { |bdn_clone| puts bdn_clone.inspect }

puts "\nUserProfiles created"
Vye::UserProfile.all.each { |user_profile| puts user_profile.inspect }
Vye::UserProfile.all.find_each { |user_profile| puts user_profile.inspect }

puts "\nUserInfos created"
Vye::UserInfo.all.each { |user_info| puts user_info.inspect }
Vye::UserInfo.all.find_each { |user_info| puts user_info.inspect }

puts "\nPendingDocuments created"
Vye::PendingDocument.all.each { |pending_document| puts pending_document.inspect }
Vye::PendingDocument.all.find_each { |pending_document| puts pending_document.inspect }

puts "\nVerifications created"
Vye::Verification.all.each { |verification| puts verification.inspect }
Vye::Verification.all.find_each { |verification| puts verification.inspect }

puts "\nAddressChanges created"
Vye::AddressChange.all.each { |address_change| puts address_change.inspect }
Vye::AddressChange.all.find_each { |address_change| puts address_change.inspect }

puts "\nAwards created"
Vye::Award.all.each { |award| puts award.inspect }
Vye::Award.all.find_each { |award| puts award.inspect }

puts "\nDirectDepositChanges created"
Vye::DirectDepositChange.all.each { |direct_deposit_change| puts direct_deposit_change.inspect }
Vye::DirectDepositChange.all.find_each { |direct_deposit_change| puts direct_deposit_change.inspect }
end
end
2 changes: 1 addition & 1 deletion modules/vye/spec/sidekiq/vye/midnight_run_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# In the RSpec test environment, the job isn't executed unless you explicitly call perform or
# configure Sidekiq for inline execution during the test.
#
# If you want to test perform_async directly in the future, you can configure Sidekiq to execute
# If you want to test perform_async directly in the future, you can configure Sidekiq to execute
# jobs immediately in your test setup. Add the following to your spec_helper.rb or rails_helper.rb:
# require 'sidekiq/testing'
# Sidekiq::Testing.inline!
Expand Down

0 comments on commit 12b4af2

Please sign in to comment.