Skip to content

Commit

Permalink
Destroy asynchronously
Browse files Browse the repository at this point in the history
  • Loading branch information
mayorova committed Oct 15, 2024
1 parent 5a16d0a commit f3f3411
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/tasks/multitenant/tenants.rake
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,9 @@ namespace :multitenant do
puts "Processing batch #{index+1} of model #{model.name}..."
batch.each do |object|
puts "- ID: #{object.id}, Tenant ID: #{object.tenant_id}"
object.destroy if destroy
DeletePlainObjectWorker.perform_later(object) if destroy
end
end
orphaned_objects.find_each { |obj| }


else
puts "No orphaned objects found for model #{model.name}."
end
Expand Down

0 comments on commit f3f3411

Please sign in to comment.