You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
400 B
10 lines
400 B
2 months ago
|
namespace :data_import do
|
||
|
desc "Add CsvVariableDefinition records for each file in the specified directory"
|
||
|
task :add_variable_definitions, [:path] => :environment do |_task, args|
|
||
|
path = Rails.root.join(args[:path])
|
||
|
service = Imports::VariableDefinitionsService.new(path:)
|
||
|
service.call
|
||
|
Rails.logger.info "CSV Variable Definitions: #{service.count} total records added"
|
||
|
end
|
||
|
end
|