dawarich/lib/tasks/imports.rake
2025-04-04 20:14:44 +02:00

13 lines
355 B
Ruby

# frozen_string_literal: true
namespace :imports do
desc 'Migrate existing imports from `raw_data` to the new file storage'
task migrate_to_new_storage: :environment do
Import.find_each do |import|
import.migrate_to_new_storage
rescue StandardError => e
puts "Error migrating import #{import.id}: #{e.message}"
end
end
end